3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = [ 0 => ['test'], 1 => null ]; var_dump(array_diff($foo, array_filter($foo, 'is_null')));
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/Jhv0g 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/Jhv0g on line 9 Notice: Array to string conversion in /in/Jhv0g 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/Jhv0g on line 3
Process exited with code 255.