3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = [1,2,3]; $arr2 = $arr1; xdebug_debug_zval('arr2'); key($arr2); xdebug_debug_zval('arr2'); unset($arr1); unset($arr2); $arr1 = [1,2,3]; $arr2 = $arr1; xdebug_debug_zval('arr2'); end($arr2); xdebug_debug_zval('arr2');
based on TXbv2
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function xdebug_debug_zval() in /in/WuQoe:5 Stack trace: #0 {main} thrown in /in/WuQoe on line 5
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Fatal error: Call to undefined function xdebug_debug_zval() in /in/WuQoe on line 5
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/WuQoe on line 2
Process exited with code 255.