3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected static $array = ['a', 'b', 'c']; protected static function getArray() { return $array; } public static function test($testArray) { return array_key_intersect($testArray, array_flip(self::getArray())); } } print_r(Test::test(['a' => 2]));

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)
5.6.130.0100.05018.27
5.6.120.0000.05320.98
5.6.110.0030.04320.98
5.6.100.0100.08321.14
5.6.90.0130.06321.04
5.6.80.0030.05020.52
5.5.290.0030.05717.99
5.5.280.0070.08020.97
5.5.270.0100.08020.79
5.5.260.0030.07720.84
5.5.250.0030.04020.55
5.5.240.0130.04020.04
5.4.450.0500.07719.17
5.4.440.0270.07719.45
5.4.430.0200.08019.58
5.4.420.0230.05719.38
5.4.410.0170.08019.20
5.4.400.0200.06319.29
5.4.390.0200.06719.22
5.4.380.0130.06719.27
5.4.370.0170.07719.13
5.4.360.0200.07718.88
5.4.350.0200.07318.92
5.4.340.0230.08019.15
5.4.320.0870.07019.15
5.4.310.0700.05719.31
5.4.300.0130.05719.15
5.4.290.0230.06719.13
5.4.280.0200.06719.15
5.4.270.0100.08019.25
5.4.260.0130.06718.98
5.4.250.0200.05019.30
5.4.240.0200.06719.39
5.4.230.0070.07319.29
5.4.220.0270.06019.25
5.4.210.0170.07318.98
5.4.200.0300.06316.71
5.4.190.0230.06319.02
5.4.180.0230.07019.02
5.4.170.0230.06719.02
5.4.160.0230.06019.12
5.4.150.0300.07019.12
5.4.140.0300.06316.41
5.4.130.0270.06316.44
5.4.120.0200.07316.35
5.4.110.0300.06016.40
5.4.100.0300.05316.30
5.4.90.0100.06316.51
5.4.80.0230.06016.48
5.4.70.0130.06016.48
5.4.60.0270.04316.41
5.4.50.0270.05016.41
5.4.40.0470.05016.53
5.4.30.0400.05716.35
5.4.20.0170.05716.48
5.4.10.0330.06316.40
5.4.00.0200.07316.02

preferences:
38.1 ms | 400 KiB | 5 Q