3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "grünf", "b" => "braun", "c" => "gelb", "rot"); $array2 = array("b" => "braun", "a" => "grünf", "gelb", "rot"); $ergebnis_array = array_intersect_assoc($array1, $array2); print_r($ergebnis_array);

preferences:
42.81 ms | 402 KiB | 5 Q