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 git.master, git.master_jit
Fatal error: Cannot redeclare mb_ord() in /in/bUGRB on line 3
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Cannot redeclare mb_ord() in /in/bUGRB on line 19
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.9 ms | 401 KiB | 8 Q