3v4l.org

run code in 300+ PHP versions simultaneously
<?php $priority = [ "a" => "AAA", "b" => "AA", "c" => "A", "d" => "BBB", "e" => "BB", "f" => "B", "g" => "CCC", "h" => "CC", "i" => "C" ]; $ratingHistory = [ "BB", "B", "CCC", "C", "BB" ]; $ratingHistory = array_intersect($priority, $ratingHistory); var_export([ 'min' => $ratingHistory[key($ratingHistory)], 'max' => $ratingHistory[array_key_last($ratingHistory)] ]);

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)
8.3.60.0090.00918.16
8.3.50.0110.00720.01
8.3.40.0130.00721.94
8.3.30.0110.00318.59
8.3.20.0000.00724.18
8.3.10.0050.00224.66
8.3.00.0040.00426.16
8.2.180.0070.00725.92
8.2.170.0080.00818.97
8.2.160.0130.00322.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0120.00619.83
8.2.110.0080.00321.18
8.2.100.0080.00317.72
8.2.90.0050.00319.16
8.2.80.0060.00317.97
8.2.70.0000.00817.63
8.2.60.0030.00517.93
8.2.50.0040.00418.10
8.2.40.0000.00819.48
8.2.30.0050.00318.06
8.2.20.0020.00522.11
8.2.10.0040.00418.16
8.2.00.0040.00419.11
8.1.280.0090.01225.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0000.00921.11
8.1.230.0110.00017.82
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0060.00317.10
8.1.180.0000.00818.10
8.1.170.0000.00817.62
8.1.160.0000.00718.85
8.1.150.0040.00418.45
8.1.140.0040.00417.43
8.1.130.0100.00018.82
8.1.120.0040.00417.29
8.1.110.0040.00417.27
8.1.100.0000.00717.41
8.1.90.0030.00517.29
8.1.80.0070.00317.40
8.1.70.0100.00517.26
8.1.60.0150.00217.48
8.1.50.0140.00317.40
8.1.40.0060.01317.47
8.1.30.0150.00417.45
8.1.20.0110.00717.59
8.1.10.0130.00317.49
8.1.00.0070.00817.41
8.0.300.0020.00518.77
8.0.290.0040.00416.63
8.0.280.0000.00718.42
8.0.270.0040.00416.79
8.0.260.0030.00318.29
8.0.250.0070.00016.82
8.0.240.0030.00316.86
8.0.230.0070.00316.92
8.0.220.0000.00816.71
8.0.210.0070.00016.66
8.0.200.0080.00616.75
8.0.190.0100.00516.85
8.0.180.0140.00016.77
8.0.170.0120.00316.71
8.0.160.0130.00016.78
8.0.150.0100.00516.72
8.0.140.0120.00316.77
8.0.130.0150.00016.80
8.0.120.0110.00416.81
8.0.110.0070.00716.74
8.0.100.0110.00416.75
8.0.90.0090.00616.79
8.0.80.0150.00016.67
8.0.70.0090.00516.77
8.0.60.0040.01216.81
8.0.50.0130.00316.85
8.0.30.0110.00416.81
8.0.20.0090.00616.79
8.0.10.0080.00816.84
7.4.330.0000.00415.55
7.4.320.0060.00016.43
7.4.300.0050.00516.41
7.4.290.0150.00016.37
7.4.280.0000.01016.50
7.4.270.0000.00916.53
7.4.260.0080.00416.34
7.4.250.0110.00316.42
7.4.240.0110.00416.52
7.4.230.0110.00616.56
7.4.220.0030.00616.46
7.4.210.0000.01016.36
7.4.200.0050.00516.34
7.4.190.0100.00316.55
7.4.180.0130.00016.47
7.4.160.0070.00416.50
7.4.150.0060.00616.52
7.4.140.0060.00616.40
7.4.130.0040.00716.21
7.4.120.0140.00016.19
7.4.110.0100.00416.29
7.4.100.0100.00316.48
7.4.90.0090.00416.34
7.4.80.0100.00216.34
7.4.70.0000.01316.19
7.4.60.0120.00016.34
7.4.50.0070.00716.12
7.4.40.0100.00016.24
7.4.30.0090.00216.27
7.4.20.0100.00216.19
7.4.10.0110.00416.31
7.4.00.0150.00016.27

preferences:
58.62 ms | 400 KiB | 5 Q