3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rex = "/^(NR\:(?P<A02PNR>.{33}))?(TL\:(?P<A02TLD>.{7}))?(C35\:(?P<A02I35>.{1}))?$/"; $s = "TL:10SEP14C35:N"; preg_match($rex, $s, $m); $ex = array_diff_key($m, range(0, count($m))); var_dump($ex);
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(3) { ["A02PNR"]=> string(0) "" ["A02TLD"]=> string(7) "10SEP14" ["A02I35"]=> string(1) "N" }
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function array_diff_key() in /in/8Sh6W on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_diff_key() in /in/8Sh6W on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_diff_key() in /in/8Sh6W on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_diff_key() in /in/8Sh6W on line 7