3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("blue", "red", "green", "blue", "blue"); echo count(array_keys($array, "blue")); for ($i = 0; $i < count(array_keys($array, "blue")); ++$i) { print $array[$i]; } ?>

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.0110.00716.75
8.3.50.0070.01122.01
8.3.40.0110.01118.70
8.3.30.0070.00719.17
8.3.20.0050.00319.91
8.3.10.0000.00721.90
8.3.00.0040.00419.13
8.2.180.0160.00016.75
8.2.170.0100.01022.96
8.2.160.0030.01021.93
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0000.00819.95
8.2.110.0040.00421.95
8.2.100.0080.00418.04
8.2.90.0000.00818.22
8.2.80.0090.00017.97
8.2.70.0050.00317.38
8.2.60.0150.01017.43
8.2.50.0050.00518.07
8.2.40.0090.00318.12
8.2.30.0000.00919.54
8.2.20.0000.00817.74
8.2.10.0080.00017.98
8.2.00.0000.00817.75
8.1.280.0180.00025.92
8.1.270.0060.00318.91
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00623.75
8.1.230.0040.00820.88
8.1.220.0040.00417.74
8.1.210.0050.00319.09
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0030.00618.10
8.1.170.0030.00518.53
8.1.160.0080.00022.02
8.1.150.0000.00718.89
8.1.140.0040.00419.23
8.1.130.0000.00717.78
8.1.120.0050.00317.36
8.1.110.0040.00417.35
8.1.100.0040.00417.40
8.1.90.0040.00317.37
8.1.80.0000.00717.44
8.1.70.0040.00417.45
8.1.60.0040.00417.60
8.1.50.0000.00717.42
8.1.40.0000.00817.50
8.1.30.0000.00917.52
8.1.20.0050.00317.64
8.1.10.0000.00817.55
8.1.00.0000.00717.40
8.0.300.0040.00420.09
8.0.290.0040.00416.75
8.0.280.0000.00718.32
8.0.270.0030.00317.26
8.0.260.0030.00317.25
8.0.250.0040.00217.00
8.0.240.0030.00316.92
8.0.230.0030.00316.90
8.0.220.0030.00316.84
8.0.210.0000.00616.70
8.0.200.0030.00316.85
8.0.190.0030.00316.95
8.0.180.0040.00416.91
8.0.170.0000.00716.94
8.0.160.0020.00516.89
8.0.150.0000.00816.73
8.0.140.0040.00416.83
8.0.130.0030.00313.38
8.0.120.0000.00716.85
8.0.110.0000.00716.89
8.0.100.0000.00716.76
8.0.90.0030.00516.78
8.0.80.0120.00916.86
8.0.70.0000.00716.83
8.0.60.0000.00716.94
8.0.50.0070.00016.75
8.0.30.0170.00617.06
8.0.20.0090.01017.40
8.0.10.0070.00016.87
8.0.00.0120.00516.71
7.4.330.0000.00515.09
7.4.320.0030.00316.65
7.4.300.0030.00316.51
7.4.290.0030.00316.51
7.4.280.0000.00716.49
7.4.270.0080.00016.61
7.4.260.0080.00016.59
7.4.250.0040.00416.59
7.4.240.0070.00016.54
7.4.230.0070.00016.70
7.4.220.0070.01116.61
7.4.210.0070.00916.68
7.4.200.0030.00316.34
7.4.160.0090.00616.50
7.4.150.0120.00617.40
7.4.140.0120.01317.86
7.4.130.0120.00716.49
7.4.120.0090.00716.53
7.4.110.0120.00616.52
7.4.100.0100.01316.30
7.4.90.0110.00716.48
7.4.80.0060.01619.39
7.4.70.0090.00616.49
7.4.60.0030.01216.49
7.4.50.0000.00916.45
7.4.40.0130.00316.32
7.4.30.0100.01316.61
7.4.00.0070.01014.82
7.3.330.0000.00713.25
7.3.320.0000.00613.15
7.3.310.0030.00316.09
7.3.300.0030.00316.18
7.3.290.0030.00316.31
7.3.280.0110.00716.22
7.3.270.0140.00417.40
7.3.260.0090.00916.48
7.3.250.0070.01016.32
7.3.240.0130.01016.23
7.3.230.0110.00516.39
7.3.210.0030.01316.28
7.3.200.0120.00419.39
7.3.190.0110.01116.54
7.3.180.0100.00616.50
7.3.170.0060.00916.47
7.3.160.0070.01316.31
7.2.330.0090.00916.82
7.2.320.0040.01216.50
7.2.310.0100.00616.65
7.2.300.0110.00616.77
7.2.290.0090.00916.70
7.2.60.0000.01217.13
7.2.00.0000.00919.59
7.1.200.0040.00815.95
7.1.100.0040.00817.99
7.1.70.0000.01117.14
7.1.60.0160.00019.46
7.1.50.0100.01016.96
7.1.00.0030.07722.33
7.0.200.0040.00416.80
7.0.140.0030.07021.99
7.0.60.0070.08719.89
7.0.50.0070.08317.81
7.0.40.0030.08320.06
7.0.30.0270.06020.21
7.0.20.0170.05320.13
7.0.10.0100.03720.22
7.0.00.0100.07020.19
5.6.280.0030.07321.06
5.6.210.0170.07320.69
5.6.200.0130.06018.16
5.6.190.0000.06020.49
5.6.180.0430.05020.35
5.6.170.0300.05020.37
5.6.160.0000.04320.49
5.6.150.0070.05018.14
5.6.140.0000.08018.15
5.6.130.0070.03718.14
5.6.120.0130.07321.12
5.6.110.0100.08021.00
5.6.100.0170.05321.11
5.6.90.0130.06320.88
5.6.80.0170.06720.37
5.5.350.0200.08020.32
5.5.340.0070.07017.92
5.5.330.0100.08020.22
5.5.320.0030.06020.28
5.5.310.0400.04020.41
5.5.300.0030.03717.93
5.5.290.0100.07717.96
5.5.280.0070.04020.95
5.5.270.0070.05320.86
5.5.260.0070.06020.75
5.5.250.0030.06720.54
5.5.240.0100.05020.26
5.4.450.0530.06319.60
5.4.440.0830.05719.27
5.4.430.1170.05719.44
5.4.420.0670.07319.44
5.4.410.0600.04718.99
5.4.400.0670.05019.00
5.4.390.1200.04318.59
5.4.380.0970.06718.54
5.4.370.1030.07718.45
5.4.360.0930.07718.68
5.4.350.0970.05718.48
5.4.340.1100.08018.64
5.4.320.1030.05718.59
5.4.310.0970.06318.68
5.4.300.0870.05018.70
5.4.290.1000.04718.45
5.4.280.0770.06018.73
5.4.270.0830.06018.75
5.4.260.0870.05318.47
5.4.250.0900.05718.45
5.4.240.1030.06018.67
5.4.230.0970.04718.68
5.4.220.0930.06018.57
5.4.210.0900.06318.71
5.4.200.0800.05716.41
5.4.190.0930.05718.47
5.4.180.1000.06318.66
5.4.170.0800.07718.61
5.4.160.1070.05018.65
5.4.150.0830.06718.43
5.4.140.0770.06016.27
5.4.130.0730.06016.30
5.4.120.1000.04716.07
5.4.110.0930.05716.13
5.4.100.0900.06316.22
5.4.90.0800.05316.08
5.4.80.1230.06316.23
5.4.70.1030.07716.22
5.4.60.0970.05716.16
5.4.50.0930.05716.09
5.4.40.0900.05716.14
5.4.30.1000.06716.11
5.4.20.1030.05016.13
5.4.10.1170.07316.21
5.4.00.1030.04715.48
5.3.290.0900.06714.65
5.3.280.0800.06014.48
5.3.270.1100.06714.60
5.3.260.1030.06014.70
5.3.250.1070.04714.52
5.3.240.1230.07014.59
5.3.230.1070.07314.53
5.3.220.0930.06014.45
5.3.210.0800.06314.66
5.3.200.1000.08014.60
5.3.190.1130.05014.55
5.3.180.0830.05714.64
5.3.170.0870.06014.55
5.3.160.0970.04014.56
5.3.150.0870.05714.65
5.3.140.0930.06014.54
5.3.130.1000.05714.43
5.3.120.1030.05014.50
5.3.110.0930.06314.64
5.3.100.1000.05314.06
5.3.90.1000.05013.97
5.3.80.1100.04013.98
5.3.70.0930.05313.96
5.3.60.0730.06314.04
5.3.50.0800.05013.93
5.3.40.0900.04313.82
5.3.30.0800.05013.84
5.3.20.0730.06713.77
5.3.10.1000.04313.62
5.3.00.0770.05713.71
5.2.170.0700.04311.09
5.2.160.1000.05711.12
5.2.150.0700.04011.09
5.2.140.0870.03711.13
5.2.130.0670.05011.15
5.2.120.0800.04711.06
5.2.110.0930.03011.05
5.2.100.0800.05311.10
5.2.90.0430.04311.07
5.2.80.0170.05011.15
5.2.70.0070.05711.05
5.2.60.0030.05011.00
5.2.50.0200.05011.05
5.2.40.0600.04710.92
5.2.30.0670.04310.96
5.2.20.0630.04710.98
5.2.10.0670.04010.87
5.2.00.0630.04310.76
5.1.60.0670.03310.00
5.1.50.0630.05310.19
5.1.40.0630.0379.96
5.1.30.0800.03710.43
5.1.20.0670.04010.46
5.1.10.0670.04710.04
5.1.00.0600.03310.10
5.0.50.0330.0308.52
5.0.40.0370.0238.39
5.0.30.0400.0608.32
5.0.20.0400.0378.17
5.0.10.0370.0278.15
5.0.00.0400.0478.34
4.4.90.0370.0205.86
4.4.80.0330.0205.85
4.4.70.0300.0275.90
4.4.60.0330.0205.89
4.4.50.0270.0275.94
4.4.40.0330.0375.88
4.4.30.0270.0275.95
4.4.20.0270.0235.95
4.4.10.0200.0275.95
4.4.00.0270.0475.94
4.3.110.0370.0275.84
4.3.100.0430.0235.74
4.3.90.0230.0235.88
4.3.80.0230.0375.90
4.3.70.0270.0205.91
4.3.60.0230.0235.84
4.3.50.0300.0235.78
4.3.40.0230.0405.79
4.3.30.0130.0275.00
4.3.20.0200.0205.00
4.3.10.0130.0235.00
4.3.00.0100.0239.22

preferences:
45.25 ms | 401 KiB | 5 Q