3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=Array ( '0' => 'H', '1' => 'e', '2'=> 'l', '3' => 'l', '4' => 'o', '5' => 'W', '6' => 'o', '7' => 'r', '8' => 'l', '9' => 'd', '10' => '!' ); $b=Array ( '1' => 'e', '5' => 'W', '7' => 'r', '10' => '!' ); print_r(array_intersect_assoc ($a,$b));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [1] => e [5] => W [7] => r [10] => ! )