3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a['a'] = ['aa' => 1, 'bb' => 2]; $a['b'] = [1 => 2, 3=> 4]; $b['a'] = ['aa' => 1, 'bb' => 3]; $b['b'] = [1 => 2, 3=> 4]; print_r(array_diff($a, $b));
based on JOOi9
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Array ( )
Output for 5.4.9 - 5.6.28
Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Notice: Array to string conversion in /in/fjs2K on line 8 Array ( )
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/fjs2K on line 3
Process exited with code 255.