3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [['a' => 1, 'b' => 2]]; $b = [['a' => 1, 'b' => 3], ['a' => 1, 'b' => 4], ['a' => 1, 'b' => 5]]; $c = array_diff($a, $b); var_dump($c);
based on eRTg3
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 array(0) { }
Output for 5.4.10 - 5.6.28
Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 Notice: Array to string conversion in /in/1cgjF on line 7 array(0) { }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/1cgjF on line 3
Process exited with code 255.