3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('hola' => 'a', 'pepe' => 'c', array(1,2,3)); $b = array('chau' => 'a', 'hola' => 'b', array(2,3,4)); var_dump(array_diff($a, $b));
based on AlojC
Output for 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 array(1) { ["pepe"]=> string(1) "c" }
Output for 5.4.0 - 5.6.21
Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 Notice: Array to string conversion in /in/RMIt1 on line 9 array(1) { ["pepe"]=> string(1) "c" }
Output for 4.3.0 - 5.3.29
array(1) { ["pepe"]=> string(1) "c" }