public function read($n) {
    if ($n < 1) {
      return "";
    }

    $string = fread($this->f, $n);
    $chunks = str_split($string, 2);
    $chunks = array_map("strrev", $chunks);

    return implode("", $chunks);
  }
public function read($n) {
    if ($n < 1) {
      return "";
    }

    $string = fread($this->f, $n);
    $chunks = str_split($string, 2);
    $chunks = array_map("strrev", $chunks);

    return implode("", $chunks);
  }
public function read ( $ n ) { if ( $ n < 1 ) { return "" ; } $ string = fread ( $ this -> f , $ n ) ; $ chunks = str_split ( $ string , 2 ) ; $ chunks = array_map ( "strrev" , $ chunks ) ; return implode ( "" , $ chunks ) ; }
Little endian version of the read method

@param int $n The number of bytes to read

@return string
Little endian version of the read method