original_string: public static function fromString($string)
  	{
  		$bits = new BitArray(strlen($string));
  		$ord = 0;
  
  		for ($offset = 0; $offset < $bits->size; $offset++)
  		{
  			if ($string[$offset] !== '0')
  			{
  				$ord |= 1 << $offset % 8;
  			}
  
  			if ($offset % 8 === 7)
  			{
  				$bits->data[(int) ($offset / 8)] = chr($ord);
  				$ord = 0;
  			}
  		}
  
  		if ($offset % 8 !== 0)
  		{
  			$bits->data[(int) ($offset / 8)] = chr($ord);
  		}
  
  		return $bits;
  	}
code: public static function fromString($string)
  	{
  		$bits = new BitArray(strlen($string));
  		$ord = 0;
  
  		for ($offset = 0; $offset < $bits->size; $offset++)
  		{
  			if ($string[$offset] !== '0')
  			{
  				$ord |= 1 << $offset % 8;
  			}
  
  			if ($offset % 8 === 7)
  			{
  				$bits->data[(int) ($offset / 8)] = chr($ord);
  				$ord = 0;
  			}
  		}
  
  		if ($offset % 8 !== 0)
  		{
  			$bits->data[(int) ($offset / 8)] = chr($ord);
  		}
  
  		return $bits;
  	}
code_tokens: public static function fromString ( $ string ) { $ bits = new BitArray ( strlen ( $ string ) ) ; $ ord = 0 ; for ( $ offset = 0 ; $ offset < $ bits -> size ; $ offset ++ ) { if ( $ string [ $ offset ] !== '0' ) { $ ord |= 1 << $ offset % 8 ; } if ( $ offset % 8 === 7 ) { $ bits -> data [ ( int ) ( $ offset / 8 ) ] = chr ( $ ord ) ; $ ord = 0 ; } } if ( $ offset % 8 !== 0 ) { $ bits -> data [ ( int ) ( $ offset / 8 ) ] = chr ( $ ord ) ; } return $ bits ; }
docstring: Create a new BitArray from a bit string
  
  @param   string  $string  A bit string
  
  @return  BitArray  A new BitArray
  
  @since   1.0.0
docstring_tokens: Create a new BitArray from a bit string