src/BitSet.php
protected function fromBinaryString($str){
		
		if(!(\is_string($str) && \preg_match('/^[01]+$/', $str))){
			throw new \InvalidArgumentException('$str is not a binary string');
		}
		
		for($i = 0, $l = \strlen($str); $i < $l; ++$i){
			$this->_List->pushFront($str[$i] === '1' ? true : false);
		}
		
	}
protected function fromBinaryString($str){
		
		if(!(\is_string($str) && \preg_match('/^[01]+$/', $str))){
			throw new \InvalidArgumentException('$str is not a binary string');
		}
		
		for($i = 0, $l = \strlen($str); $i < $l; ++$i){
			$this->_List->pushFront($str[$i] === '1' ? true : false);
		}
		
	}
protected function fromBinaryString ( $ str ) { if ( ! ( \ is_string ( $ str ) && \ preg_match ( '/^[01]+$/' , $ str ) ) ) { throw new \ InvalidArgumentException ( '$str is not a binary string' ) ; } for ( $ i = 0 , $ l = \ strlen ( $ str ) ; $ i < $ l ; ++ $ i ) { $ this -> _List -> pushFront ( $ str [ $ i ] === '1' ? true : false ) ; } }
Sets bits from a binary string
@param string $str
@throws \InvalidArgumentException
Sets bits from a binary string