3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isAvailable($date){ return ! in_array($date, array(3, 4, 5, 10, 11, 12, 23, 24, 25, 26)); } $a = array(); $consecutively = 0; $l = 0; for($i = 1; $i <= 30; $i++) { $isAvailable = isAvailable($i); $a[$i] = array('isAvailable' => $isAvailable); if($isAvailable) { $consecutively++; $a[$i]['consecutively'] =& $consecutively; } else { unset($consecutively); $consecutively = 0; } } print_r($a);

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.0120.00316.50
8.3.50.0100.00921.98
8.3.40.0210.00018.69
8.3.30.0070.00719.04
8.3.20.0120.00620.04
8.3.10.0040.00423.78
8.3.00.0030.00622.39
8.2.180.0120.00318.19
8.2.170.0100.01022.96
8.2.160.0070.01322.11
8.2.150.0000.00924.18
8.2.140.0080.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00420.45
8.2.110.0110.00022.29
8.2.100.0040.00817.78
8.2.90.0000.00817.84
8.2.80.0030.00519.17
8.2.70.0040.00417.93
8.2.60.0000.01019.81
8.2.50.0030.00518.10
8.2.40.0000.00720.50
8.2.30.0000.00817.99
8.2.20.0040.00417.68
8.2.10.0030.00518.21
8.2.00.0070.00017.98
8.1.280.0070.00725.92
8.1.270.0120.00620.20
8.1.260.0040.00726.35
8.1.250.0040.00428.09
8.1.240.0070.00320.50
8.1.230.0000.01122.82
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0000.00817.35
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0000.00818.39
8.1.160.0050.00322.12
8.1.150.0040.00418.87
8.1.140.0070.00017.38
8.1.130.0050.00217.69
8.1.120.0000.00717.39
8.1.110.0000.00817.41
8.1.100.0000.00917.38
8.1.90.0050.00217.49
8.1.80.0060.00317.31
8.1.70.0030.00317.34
8.1.60.0030.00617.54
8.1.50.0040.00717.54
8.1.40.0000.00817.50
8.1.30.0000.00817.55
8.1.20.0040.00417.57
8.1.10.0050.00217.45
8.1.00.0000.00717.35
8.0.300.0050.00221.96
8.0.290.0070.00016.75
8.0.280.0070.00018.35
8.0.270.0000.00717.25
8.0.260.0030.00317.18
8.0.250.0030.00316.86
8.0.240.0070.00016.98
8.0.230.0000.00716.98
8.0.220.0070.00316.82
8.0.210.0070.00016.87
8.0.200.0030.00316.87
8.0.190.0000.00816.95
8.0.180.0070.00016.89
8.0.170.0040.00416.80
8.0.160.0030.00516.86
8.0.150.0000.00716.81
8.0.140.0040.00416.82
8.0.130.0000.00913.24
8.0.120.0050.00516.74
8.0.110.0000.00716.91
8.0.100.0040.00416.99
8.0.90.0070.00016.82
8.0.80.0130.00316.85
8.0.70.0000.00716.75
8.0.60.0040.00416.83
8.0.50.0000.00716.92
8.0.30.0060.01117.12
8.0.20.0120.00917.40
8.0.10.0050.00316.86
8.0.00.0120.00516.75
7.4.330.0020.00215.08
7.4.320.0030.00316.48
7.4.300.0060.00016.61
7.4.290.0030.00316.63
7.4.280.0040.00416.55
7.4.270.0000.00716.61
7.4.260.0090.00016.59
7.4.250.0040.00416.32
7.4.240.0030.00316.61
7.4.230.0050.00216.68
7.4.220.0110.01116.59
7.4.210.0060.01016.57
7.4.200.0030.00316.53
7.4.160.0070.00716.21
7.4.150.0110.00617.40
7.4.140.0080.01317.86
7.4.130.0090.00916.51
7.4.120.0090.00816.58
7.4.110.0160.00316.61
7.4.100.0170.00716.50
7.4.90.0110.01116.50
7.4.80.0120.00619.39
7.4.70.0100.01016.46
7.4.60.0130.00316.55
7.4.50.0030.00516.42
7.4.40.0080.00816.64
7.4.30.0120.00416.38
7.4.00.0100.00314.64
7.3.330.0020.00313.29
7.3.320.0000.00613.42
7.3.310.0000.00716.37
7.3.300.0040.00216.36
7.3.290.0060.01216.32
7.3.280.0050.01316.33
7.3.270.0090.00917.40
7.3.260.0190.00016.54
7.3.250.0120.00716.38
7.3.240.0070.01316.48
7.3.230.0110.00616.59
7.3.210.0130.01316.36
7.3.200.0060.00916.43
7.3.190.0140.00316.47
7.3.180.0090.00616.70
7.3.170.0110.01116.27
7.3.160.0100.00716.30
7.3.10.0150.00516.32
7.3.00.0130.00616.21
7.2.330.0080.01116.70
7.2.320.0180.00616.68
7.2.310.0110.00716.75
7.2.300.0170.00716.68
7.2.290.0030.01416.75
7.2.130.0120.00416.59
7.2.120.0210.00316.74
7.2.110.0110.01416.65
7.2.100.0130.01016.57
7.2.90.0120.00616.63
7.2.80.0110.00616.76
7.2.70.0100.01416.68
7.2.60.0090.00716.75
7.2.50.0140.00716.50
7.2.40.0150.00616.27
7.2.30.0120.00816.73
7.2.20.0070.01116.54
7.2.10.0060.00616.63
7.2.00.0050.01018.12
7.1.250.0190.00415.74
7.1.200.0030.00716.00
7.1.100.0040.00718.17
7.1.70.0040.00417.09
7.1.60.0080.00317.22
7.1.50.0030.01716.95
7.1.00.0000.08022.57
7.0.200.0070.01316.55
7.0.60.0130.07719.93
7.0.50.0070.08017.87
7.0.40.0070.07720.02
7.0.30.0470.06320.09
7.0.20.0270.03320.08
7.0.10.0170.07320.07
7.0.00.0170.07720.20
5.6.280.0030.04021.05
5.6.210.0130.04320.70
5.6.200.0100.08318.16
5.6.190.0130.05320.33
5.6.180.3400.04320.57
5.6.170.0230.08320.48
5.6.160.0170.08020.46
5.6.150.0070.04718.15
5.6.140.0030.06318.16
5.6.130.0070.08318.16
5.6.120.0170.03721.02
5.6.110.0070.08321.14
5.6.100.0170.08021.13
5.6.90.0100.08320.88
5.6.80.0030.08020.38
5.6.70.0370.05720.40
5.5.350.0170.03320.45
5.5.340.0100.07718.02
5.5.330.0070.06720.27
5.5.320.0430.07020.24
5.5.310.0330.07720.25
5.5.300.0100.08317.93
5.5.290.0030.05018.03
5.5.280.0130.08020.98
5.5.270.0130.08020.96
5.5.260.0130.07320.87
5.5.250.0070.08320.55
5.5.240.4070.03720.12
5.4.450.0900.05019.57
5.4.440.0570.07719.56
5.4.430.0930.06719.38
5.4.420.0930.07319.58
5.4.410.1000.06019.34
5.4.400.1030.05319.33
5.4.390.0930.05319.14
5.4.380.1130.05719.30
5.4.370.0830.05719.11
5.4.360.0970.05719.32
5.4.350.1030.07019.15
5.4.340.1130.05319.32
5.4.320.1300.06719.15
5.4.310.0830.05719.38
5.4.300.0930.06319.38
5.4.290.0770.06319.37
5.4.280.1000.05019.14
5.4.270.0830.06319.30
5.4.260.0730.07019.00
5.4.250.0800.06719.28
5.4.240.0770.05719.24
5.4.230.0900.04719.14
5.4.220.0870.06319.14
5.4.210.1170.03319.02
5.4.200.0970.06016.72
5.4.190.0900.07019.28
5.4.180.0700.06018.97
5.4.170.0670.06318.98
5.4.160.1030.08019.36
5.4.150.1030.04719.13
5.4.140.0930.06716.36
5.4.130.0600.07016.55
5.4.120.0830.04716.41
5.4.110.1000.05016.43
5.4.100.0970.07316.51
5.4.90.0930.06016.55
5.4.80.0770.05716.52
5.4.70.1030.05016.41
5.4.60.0970.05016.49
5.4.50.0870.05016.36
5.4.40.1070.05716.52
5.4.30.0900.04316.52
5.4.20.1000.06316.36
5.4.10.0970.04716.31
5.4.00.0730.05015.89
5.3.290.0870.06314.64
5.3.280.1230.06014.52
5.3.270.0770.05714.60
5.3.260.1030.05314.76
5.3.250.1400.07314.63
5.3.240.0870.05314.63
5.3.230.0970.05714.62
5.3.220.0970.07014.49
5.3.210.0930.08014.44
5.3.200.1170.06314.58
5.3.190.1000.06014.63
5.3.180.1330.06014.64
5.3.170.1070.05714.79
5.3.160.0870.06014.58
5.3.150.0900.05314.59
5.3.140.1130.05014.55
5.3.130.1000.05314.72
5.3.120.0900.05314.47
5.3.110.0930.06014.47
5.3.100.1170.04714.04
5.3.90.0830.05313.94
5.3.80.1030.05314.26
5.3.70.1030.05713.94
5.3.60.0970.04713.91
5.3.50.0730.06014.02
5.3.40.1030.04714.04
5.3.30.0800.05713.78
5.3.20.0700.06013.56
5.3.10.0930.04313.72
5.3.00.0770.05713.55
5.2.170.0730.05011.18
5.2.160.0800.05711.25
5.2.150.0800.04711.07
5.2.140.0530.05011.06
5.2.130.0700.04011.04
5.2.120.0630.05711.04
5.2.110.0600.05011.14
5.2.100.0700.03711.04
5.2.90.0870.04311.19
5.2.80.0870.05311.02
5.2.70.0900.06310.97
5.2.60.0700.05310.97
5.2.50.0770.04311.08
5.2.40.0800.03711.05
5.2.30.0630.05710.88
5.2.20.0730.04310.88
5.2.10.0830.04710.92
5.2.00.0730.04010.63
5.1.60.0600.04710.07
5.1.50.0730.0379.89
5.1.40.0700.0479.83
5.1.30.0600.04710.27
5.1.20.0870.04710.28
5.1.10.0630.03310.02
5.1.00.0700.0439.98
5.0.50.0370.0378.46
5.0.40.0330.0378.40
5.0.30.0400.0438.16
5.0.20.0330.0238.13
5.0.10.0400.0278.08
5.0.00.0470.0378.09
4.4.90.0270.0235.85
4.4.80.0270.0235.78
4.4.70.0230.0235.87
4.4.60.0230.0235.86
4.4.50.0200.0305.77
4.4.40.0170.0435.86
4.4.30.0300.0235.81
4.4.20.0200.0335.87
4.4.10.0300.0235.88
4.4.00.0300.0405.88
4.3.110.0370.0175.79
4.3.100.0300.0235.74
4.3.90.0270.0235.73
4.3.80.0370.0405.78
4.3.70.0330.0275.80
4.3.60.0370.0305.77
4.3.50.0370.0205.75
4.3.40.0300.0335.79
4.3.30.0130.0234.54
4.3.20.0200.0204.55
4.3.10.0130.0234.48
4.3.00.0200.02310.60

preferences:
60.11 ms | 401 KiB | 5 Q