original_string: public static function str2bin($string)
      {
          if (is_array($string) || is_object($string)) {
              $caller =  next(debug_backtrace());
              $error['line']  = $caller['line'];
              $error['file']  = strip_tags($caller['file']);
              trigger_error(
                  "str2bin() expects parameter 1 to be string, "
                  . gettype($string)
                  . " given in <b>{$error['file']}</b> on line <b>{$error['line']}</b><br />\n",
                  E_USER_ERROR
              );
  
              return '';
          }
  
          if (strlen($string) <= 0) {
              return '';
          }
  
          $string = str_split($string, 1);
          for ($i = 0, $n = count($string); $i < $n; ++$i) {
              $string[$i] = decbin(ord($string[$i]));
              $string[$i] = str_repeat("0", 8 - strlen($string[$i])) . $string[$i];
          }
  
          return implode("", $string);
      }
code: public static function str2bin($string)
      {
          if (is_array($string) || is_object($string)) {
              $caller =  next(debug_backtrace());
              $error['line']  = $caller['line'];
              $error['file']  = strip_tags($caller['file']);
              trigger_error(
                  "str2bin() expects parameter 1 to be string, "
                  . gettype($string)
                  . " given in <b>{$error['file']}</b> on line <b>{$error['line']}</b><br />\n",
                  E_USER_ERROR
              );
  
              return '';
          }
  
          if (strlen($string) <= 0) {
              return '';
          }
  
          $string = str_split($string, 1);
          for ($i = 0, $n = count($string); $i < $n; ++$i) {
              $string[$i] = decbin(ord($string[$i]));
              $string[$i] = str_repeat("0", 8 - strlen($string[$i])) . $string[$i];
          }
  
          return implode("", $string);
      }
code_tokens: public static function str2bin ( $ string ) { if ( is_array ( $ string ) || is_object ( $ string ) ) { $ caller = next ( debug_backtrace ( ) ) ; $ error [ 'line' ] = $ caller [ 'line' ] ; $ error [ 'file' ] = strip_tags ( $ caller [ 'file' ] ) ; trigger_error ( "str2bin() expects parameter 1 to be string, " . gettype ( $ string ) . " given in <b>{$error['file']}</b> on line <b>{$error['line']}</b><br />\n" , E_USER_ERROR ) ; return '' ; } if ( strlen ( $ string ) <= 0 ) { return '' ; } $ string = str_split ( $ string , 1 ) ; for ( $ i = 0 , $ n = count ( $ string ) ; $ i < $ n ; ++ $ i ) { $ string [ $ i ] = decbin ( ord ( $ string [ $ i ] ) ) ; $ string [ $ i ] = str_repeat ( "0" , 8 - strlen ( $ string [ $ i ] ) ) . $ string [ $ i ] ; } return implode ( "" , $ string ) ; }
docstring: Converting string into binary
  
  @param  string $string the string to convert
  @return string
docstring_tokens: Converting string into binary