3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array( array(0, 'foo'), array(1, 'bar') ); $b = array( array(0, 'foo'), array(2, 'baz') ); $intersect = array_intersect($a, $b); var_dump($intersect);
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 Notice: Array to string conversion in /in/JOMI9 on line 12 array(2) { [0]=> array(2) { [0]=> int(0) [1]=> string(3) "foo" } [1]=> array(2) { [0]=> int(1) [1]=> string(3) "bar" } }
Output for 4.3.0 - 5.3.29
array(2) { [0]=> array(2) { [0]=> int(0) [1]=> string(3) "foo" } [1]=> array(2) { [0]=> int(1) [1]=> string(3) "bar" } }