3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1 => 'a', 2=> 'b', 3 => 'c']; $b = [1, 3]; var_dump(array_intersect_key($a, $b))
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
Parse error: syntax error, unexpected end of file in /in/ISjm4 on line 5
Process exited with code 255.

preferences:
175 ms | 1399 KiB | 71 Q