3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [ 1 => 'value1', 2 => [], 3 => '', 2 => [ 1 => 'value1', 2 => [], 3 => 'value3', 4 => '', ], 4 => 'value4', ]; array_values(array_diff($array, ['']));
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/idT70 on line 14
Output for 5.4.12 - 5.6.28
Notice: Array to string conversion in /in/idT70 on line 14 Notice: Array to string conversion in /in/idT70 on line 14 Notice: Array to string conversion in /in/idT70 on line 14 Notice: Array to string conversion in /in/idT70 on line 14 Notice: Array to string conversion in /in/idT70 on line 14
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/idT70 on line 2
Process exited with code 255.