3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = count(get_defined_vars()); $undef; @$nothing = $undef; $c = get_defined_vars(); @xdebug_debug_zval('nothing'); echo 'Declared vars:',"\n"; var_dump(xdebug_get_declared_vars()); echo 'Defined vars:<br>'; var_dump(array_slice($c, $a + 1));
based on UJs0W
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function xdebug_debug_zval() in /in/mZCKd:10 Stack trace: #0 {main} thrown in /in/mZCKd on line 10
Process exited with code 255.
Output for 5.1.0 - 5.6.28

Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: undef in /in/mZCKd on line 5
Process exited with code 255.
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: undef in /in/mZCKd on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: undef in /in/mZCKd on line 5