3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = ['a', 'b', 'c', 'd']; $arr2 = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; var_dump(array_diff($arr2, $arr));
based on Ok771
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
array(3) { [4]=> string(1) "e" [5]=> string(1) "f" [6]=> string(1) "g" }