3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = [ 0 => ['test'], 1 => null ]; $bar = array_filter($foo, 'is_null'); var_dump(array_diff($foo, $bar));
based on Jhv0g
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/uojqP on line 9 array(1) { [0]=> array(1) { [0]=> string(4) "test" } }
Output for 5.4.10 - 5.6.28
Notice: Array to string conversion in /in/uojqP on line 9 Notice: Array to string conversion in /in/uojqP on line 9 array(1) { [0]=> array(1) { [0]=> string(4) "test" } }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/uojqP on line 3
Process exited with code 255.