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));

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.0330.06320.21
7.0.10.0000.05720.19
7.0.00.0100.05020.06
5.6.170.0330.07020.55
5.6.160.0100.07720.49
5.6.150.0070.05718.18
5.6.140.0100.05318.14
5.6.130.0030.04318.21
5.6.120.0070.08021.00
5.6.110.0100.06721.02
5.6.100.0030.04020.97
5.6.90.0070.08321.10
5.6.80.0100.07320.37
5.5.310.0270.07020.19
5.5.300.0100.06318.08
5.5.290.0070.07718.07
5.5.280.0100.06720.84
5.5.270.0170.07020.79
5.5.260.0170.08020.86
5.5.250.0100.03320.68
5.5.240.0030.05320.26

preferences:
146.89 ms | 1394 KiB | 7 Q