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(array_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.0200.08320.12
7.0.10.0100.05020.20
7.0.00.0070.08720.08
5.6.170.0200.05720.59
5.6.160.0030.04720.56
5.6.150.0030.07718.18
5.6.140.0100.07318.20
5.6.130.0030.04018.18
5.6.120.0070.08320.98
5.6.110.0200.08021.02
5.6.100.0130.03720.97
5.6.90.0100.08321.01
5.6.80.0030.07020.50
5.5.310.0230.08320.19
5.5.300.0100.04717.98
5.5.290.0030.06017.96
5.5.280.0030.06020.68
5.5.270.0070.04320.76
5.5.260.0030.08020.89
5.5.250.0100.08020.79
5.5.240.0030.07020.14

preferences:
141.56 ms | 1394 KiB | 7 Q