3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = array( 'a' => 'Apple', 'b' => 'Banana' ); $arr2 = array( 'b' => 'Banana', 'a' => 'Australia', 'Apple' ); $arr3 = array_diff($arr1, $arr2); $arr4 = array_diff($arr2, $arr1); $keys = array_keys($arr4); echo count($arr3) . ' - ' . $keys[0]; ?>
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.1.7
0 - a