3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test {} $class = 'TEST'; $table = get_declared_classes() + get_declared_interfaces() + get_declared_traits(); $table = array_change_key_case(array_combine($table, $table), CASE_LOWER); var_dump($class, $table[strtolower($table)]);
based on upQiP
Output for 5.4.0 - 7.2.0
Warning: strtolower() expects parameter 1 to be string, array given in /in/G87Ui on line 9 Notice: Undefined index: in /in/G87Ui on line 9 string(4) "TEST" NULL
Output for 5.0.0 - 5.3.29
Fatal error: Call to undefined function get_declared_traits() in /in/G87Ui on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: get_declared_interfaces() in /in/G87Ui on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: get_declared_interfaces() in /in/G87Ui on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: get_declared_interfaces() in /in/G87Ui on line 7