3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $values = 1; if( ! (array_key_exists( 'values', get_defined_vars()) && (is_array($values)))) { throw new Exception( implode(', ', [NULL, 'values', 'array', array_key_exists( 'values', get_defined_vars()) ? gettype($values) : 'none']) ); }
based on nX3Nj
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: , values, array, integer in /in/1BLu4:6 Stack trace: #0 {main} thrown in /in/1BLu4 on line 6
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message ', values, array, integer' in /in/1BLu4:6 Stack trace: #0 {main} thrown in /in/1BLu4 on line 6
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/1BLu4 on line 7
Process exited with code 255.