3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function mb_ord($string) { if (extension_loaded('mbstring') === true) { mb_language('Neutral'); mb_internal_encoding('UTF-8'); mb_detect_order(array('UTF-8', 'ISO-8859-15', 'ISO-8859-1', 'ASCII')); $result = unpack('N', mb_convert_encoding($string, 'UCS-4BE', 'UTF-8')); if (is_array($result) === true) { return $result[1]; } } return ord($string); } $text = '‖‖‖‖‖‖‖‖‖‖'; $text = preg_split('//u', $text, -1, PREG_SPLIT_NO_EMPTY); for ($idx = 0; $idx < count($text); $idx++) { echo $text[$idx] . ' ' . mb_ord($text[$idx]) . PHP_EOL; }
Output for 5.0.2 - 7.1.0
‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214 ‖ 8214
Output for 5.0.0 - 5.0.1
‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL‖ 8214PHP_EOL
Output for 4.3.10 - 4.4.9
‖‖‖‖‖‖‖‖‖‖ 8214
Output for 4.3.5 - 4.3.9
‖‖‖‖‖‖‖‖‖‖ 8214PHP_EOL
Output for 4.3.2 - 4.3.4
<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack(): Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 226PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 128PHP_EOL<br /> <b>Warning</b>: unpack() [<a href='http://www.php.net/function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in <b>/in/bUGRB</b> on line <b>11</b><br /> � 150PHP_EOL