3v4l.org

run code in 150+ 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.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0 - a