3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $constants = preg_grep('/^T_/', array_keys(get_defined_constants())); $constants = array_combine($constants, array_map('constant', $constants)); asort($constants); var_dump(array_slice($constants, 0, 1, true));
Output for 7.0.0 - 7.1.0, 7.2.0
array(1) { ["T_INCLUDE"]=> int(258) }
Output for 5.1.0 - 5.6.28, 7.1.5 - 7.1.10
array(1) { ["T_REQUIRE_ONCE"]=> int(258) }
Output for 5.0.2 - 5.0.5
array(1) { ["T_INCLUDE"]=> int(257) }
Output for 5.0.0 - 5.0.1
Warning: Wrong parameter count for array_slice() in /in/uSrMN on line 6 NULL
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_combine() in /in/uSrMN on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_combine() in /in/uSrMN on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_combine() in /in/uSrMN on line 4