3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php $array = [ 'two' => 'a', 'three' => 'b', 'one' => 'c', ]; $keyswant = [ 'one' => '1', 'three' => '3', ]; print_r(array_intersect_key($array, $keyswant)); print_r(arrar_combine(array_keys($array), array_values($keyswant)));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.20.0230.04720.11
7.0.10.0070.06020.20
7.0.00.0100.04320.30
5.6.170.0370.06720.48
5.6.160.0100.08020.57
5.6.150.0070.04718.29
5.6.140.0130.04318.14
5.6.130.0030.05018.19
5.6.120.0130.05021.02
5.6.110.0070.07720.98
5.6.100.0100.03720.98
5.6.90.0070.06320.99
5.6.80.0030.09020.28
5.5.310.0270.04320.29
5.5.300.0030.06018.00
5.5.290.0030.05718.02
5.5.280.0130.08020.82
5.5.270.0100.07020.79
5.5.260.0130.04720.76
5.5.250.0030.04020.68
5.5.240.0100.06320.27

preferences:
148.04 ms | 1394 KiB | 7 Q