3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.1.19 - 8.1.28, 8.2.6 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Cannot redeclare mb_ord() in /in/bUGRB on line 19
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.18, 8.2.0 - 8.2.5
Fatal error: Cannot redeclare mb_ord() in /in/bUGRB on line 3
Process exited with code 255.
Output for 7.2.6 - 7.2.33, 7.3.12 - 7.3.33
Fatal error: Cannot redeclare mb_ord() in /in/bUGRB on line 20
Process exited with code 255.
Output for 5.0.2 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
‖ 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.3.11, 4.4.0 - 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

preferences:
224.58 ms | 413 KiB | 343 Q