3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0]; $max = 0; for ($i = 0, $l = ceil(count($arr)) / 2; $i < $l; $i++) { if ($arr[$i] > $max) { $max = $arr[$i]; } } for ($l = count($arr); $i < $l; $i++) { if ($arr[$i] > $max) { $max = $arr[$i]; break; } } echo "$max in $i iterations";

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.40.0000.01418.84
8.3.30.0040.01120.33
8.3.20.0060.01018.82
8.3.10.0080.00021.27
8.3.00.0080.00019.68
8.2.170.0120.00622.96
8.2.160.0110.00420.55
8.2.150.0090.00024.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0000.00819.95
8.2.110.0000.01020.83
8.2.100.0040.00717.76
8.2.90.0040.00419.30
8.2.80.0030.00517.97
8.2.70.0080.00017.75
8.2.60.0000.00817.93
8.2.50.0080.00018.10
8.2.40.0040.00822.10
8.2.30.0000.00719.43
8.2.20.0040.00417.71
8.2.10.0030.00617.80
8.2.00.0000.00817.75
8.1.270.0040.00423.99
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00319.59
8.1.230.0120.00017.82
8.1.220.0000.00917.78
8.1.210.0050.00318.77
8.1.200.0100.00017.36
8.1.190.0030.00617.23
8.1.180.0000.00718.10
8.1.170.0040.00418.60
8.1.160.0080.00022.13
8.1.150.0000.00718.64
8.1.140.0040.00417.46
8.1.130.0000.00717.82
8.1.120.0000.00717.52
8.1.110.0040.00417.42
8.1.100.0000.00717.36
8.1.90.0020.00517.48
8.1.80.0040.00417.37
8.1.70.0070.00017.36
8.1.60.0030.00617.51
8.1.50.0030.00617.38
8.1.40.0040.00417.41
8.1.30.0040.00417.54
8.1.20.0090.00017.65
8.1.10.0040.00417.57
8.1.00.0040.00417.51
8.0.300.0060.00318.77
8.0.290.0070.00316.75
8.0.280.0030.00318.35
8.0.270.0040.00417.20
8.0.260.0060.00016.83
8.0.250.0030.00316.84
8.0.240.0040.00416.93
8.0.230.0030.00316.90
8.0.220.0030.00516.89
8.0.210.0030.00316.88
8.0.200.0000.00616.94
8.0.190.0030.00516.88
8.0.180.0040.00416.83
8.0.170.0040.00416.77
8.0.160.0040.00416.90
8.0.150.0000.00716.74
8.0.140.0000.00716.83
8.0.130.0030.00313.34
8.0.120.0080.00016.78
8.0.110.0000.00716.81
8.0.100.0070.00016.87
8.0.90.0040.00416.96
8.0.80.0090.00616.96
8.0.70.0020.00516.94
8.0.60.0080.00016.67
8.0.50.0080.00016.78
8.0.30.0130.00516.92
8.0.20.0070.01217.40
8.0.10.0000.00817.05
8.0.00.0100.00816.75
7.4.330.0050.00016.76
7.4.320.0030.00316.51
7.4.300.0000.00716.61
7.4.290.0070.00016.58
7.4.280.0050.00216.52
7.4.270.0030.00316.62
7.4.260.0030.00313.28
7.4.250.0050.00316.63
7.4.240.0070.00016.49
7.4.230.0040.00416.72
7.4.220.0060.01216.66
7.4.210.0070.01016.54
7.4.200.0000.00816.62
7.4.190.0040.00416.77
7.4.160.0100.00716.49
7.4.150.0140.00317.40
7.4.140.0090.00917.86
7.4.130.0120.00516.50
7.4.120.0110.00816.50
7.4.110.0100.01016.73
7.4.100.0040.01516.43
7.4.90.0110.00616.47
7.4.80.0100.00719.39
7.4.70.0120.00816.58
7.4.60.0090.00916.38
7.4.50.0040.00416.35
7.4.40.0040.01222.77
7.4.30.0030.01516.58
7.4.00.0130.00314.84
7.3.330.0000.00513.06
7.3.320.0050.00013.07
7.3.310.0030.00316.20
7.3.300.0030.00316.32
7.3.290.0080.01116.37
7.3.280.0090.00716.32
7.3.270.0060.01017.40
7.3.260.0150.00718.24
7.3.250.0180.00216.41
7.3.240.0030.01416.52
7.3.230.0130.00316.39
7.3.210.0100.00716.56
7.3.200.0120.00919.39
7.3.190.0160.00316.68
7.3.180.0180.00316.28
7.3.170.0110.00416.57
7.3.160.0100.00916.59
7.3.120.0050.01114.52
7.3.110.0070.00914.86
7.3.100.0050.01114.81
7.3.90.0040.00914.88
7.3.80.0050.01014.82
7.3.70.0080.00714.84
7.3.60.0040.00814.89
7.3.50.0030.00714.73
7.3.40.0030.01014.45
7.3.30.0050.00814.67
7.3.20.0050.00616.49
7.3.10.0090.00716.51
7.3.00.0100.00516.54
7.2.330.0070.01616.53
7.2.320.0030.01316.53
7.2.310.0100.01016.50
7.2.300.0060.00916.60
7.2.290.0110.00516.81
7.2.240.0050.00914.89
7.2.230.0090.00514.75
7.2.220.0070.00914.86
7.2.210.0050.01214.98
7.2.200.0080.00614.93
7.2.190.0100.00714.91
7.2.180.0060.00914.93
7.2.170.0070.00914.94
7.2.160.0090.00715.02
7.2.150.0070.00716.77
7.2.140.0060.00716.80
7.2.130.0090.00816.56
7.2.120.0080.00816.57
7.2.110.0090.00616.80
7.2.100.0070.00816.83
7.2.90.0070.01116.77
7.2.80.0090.00716.64
7.2.70.0090.00916.83
7.2.60.0130.00816.77
7.2.50.0070.01016.74
7.2.40.0090.01016.73
7.2.30.0090.00616.73
7.2.20.0120.00816.62
7.2.10.0140.00416.63
7.2.00.0080.00917.25
7.1.330.0060.00815.71
7.1.320.0040.01215.75
7.1.310.0080.00815.55
7.1.300.0090.00515.75
7.1.290.0080.00615.78
7.1.280.0020.01215.59
7.1.270.0040.01115.66
7.1.260.0040.01015.89
7.1.250.0080.00715.66
7.1.240.0120.00915.44
7.1.230.0090.00615.72
7.1.220.0030.00915.97
7.1.210.0130.00715.66
7.1.200.0130.00315.70
7.1.190.0120.00615.77
7.1.180.0070.01315.67
7.1.170.0120.00615.74
7.1.160.0060.00615.44
7.1.150.0140.00315.48
7.1.140.0100.00715.71
7.1.130.0060.00615.77
7.1.120.0100.00715.66
7.1.110.0100.00615.79
7.1.100.0100.00516.93
7.1.90.0140.00315.73
7.1.80.0070.00715.53
7.1.70.0050.00516.39
7.1.60.0100.01017.49
7.1.50.0080.01216.31
7.1.40.0070.01115.81
7.1.30.0070.00715.47
7.1.20.0100.01315.29
7.1.10.0170.00015.28
7.1.00.0070.02219.06
7.0.330.0090.00615.50
7.0.320.0040.00715.03
7.0.310.0150.00415.03
7.0.300.0150.00015.27
7.0.290.0190.00014.87
7.0.280.0110.00415.29
7.0.270.0140.00415.35
7.0.260.0090.00615.28
7.0.250.0080.00815.36
7.0.240.0090.00415.10
7.0.230.0070.01015.45
7.0.220.0140.00315.05
7.0.210.0130.00714.89
7.0.200.0050.00616.11
7.0.190.0130.00315.09
7.0.180.0130.00615.02
7.0.170.0140.00714.94
7.0.160.0090.00715.17
7.0.150.0160.00015.45
7.0.140.0070.04018.80
7.0.130.0070.01715.15
7.0.120.0110.00715.23
7.0.110.0070.01115.27
7.0.100.0050.02517.52
7.0.90.0090.02017.55
7.0.80.0070.02617.55
7.0.70.0120.04217.47
7.0.60.0050.03317.46
7.0.50.0050.02917.69
7.0.40.0100.04116.65
7.0.30.0040.03516.79
7.0.20.0100.03816.82
7.0.10.0150.02216.79
7.0.00.0080.02516.74
5.6.380.0100.00314.14
5.6.370.0160.00613.92
5.6.360.0200.00414.14
5.6.350.0170.00314.36
5.6.340.0160.01114.61
5.6.330.0090.01314.51
5.6.320.0150.00514.20
5.6.310.0210.00014.66
5.6.300.0170.00814.48
5.6.290.0230.00014.34
5.6.280.0120.03717.48
5.6.270.0050.01814.78
5.6.260.0200.00614.64
5.6.250.0050.02317.62
5.6.240.0050.02417.50
5.6.230.0100.02117.57
5.6.220.0140.02417.51
5.6.210.0120.02617.57
5.6.200.0120.02817.68
5.6.190.0100.03417.64
5.6.180.0150.02817.67
5.6.170.0070.03017.72
5.6.160.0070.02517.52
5.6.150.0130.03717.58
5.6.140.0080.03217.51
5.6.130.0100.03217.58
5.6.120.0040.03717.62
5.6.110.0080.04517.59
5.6.100.0080.04117.70
5.6.90.0130.04517.71
5.6.80.0080.03917.33
5.6.70.0150.02417.37
5.6.60.0010.03117.22
5.6.50.0110.02117.38
5.6.40.0050.03717.19
5.6.30.0090.02917.31
5.6.20.0090.02417.18
5.6.10.0050.02817.45
5.6.00.0050.02817.20
5.5.380.0020.02415.78
5.5.370.0030.02215.59
5.5.360.0060.02215.73
5.5.350.0060.02215.76
5.5.340.0090.02516.13
5.5.330.0090.02616.10
5.5.320.0080.02816.14
5.5.310.0110.04315.89
5.5.300.0100.03715.86
5.5.290.0100.02715.89
5.5.280.0070.03916.05
5.5.270.0080.03816.04
5.5.260.0080.02815.99
5.5.250.0080.04115.74
5.5.240.0080.02815.61
5.5.230.0060.02615.50
5.5.220.0050.02815.49
5.5.210.0080.02515.68
5.5.200.0090.02615.70
5.5.190.0070.02715.71
5.5.180.0060.02415.75
5.5.170.0000.01010.65
5.5.160.0070.03315.69
5.5.150.0060.02415.57
5.5.140.0080.02115.76
5.5.130.0050.03015.47
5.5.120.0090.03715.63
5.5.110.0070.03715.67
5.5.100.0030.02815.63
5.5.90.0050.03015.53
5.5.80.0110.02215.64
5.5.70.0020.03815.43
5.5.60.0030.04715.56
5.5.50.0110.02315.61
5.5.40.0090.03215.64
5.5.30.0060.02215.56
5.5.20.0050.04015.70
5.5.10.0080.02515.46
5.5.00.0030.03015.37
5.4.450.0040.03715.23
5.4.440.0090.03715.22
5.4.430.0070.02515.36
5.4.420.0090.02215.12
5.4.410.0120.03015.07
5.4.400.0040.02414.94
5.4.390.0080.02715.02
5.4.380.0030.03215.06
5.4.370.0060.03514.90
5.4.360.0080.03215.00
5.4.350.0050.02914.95
5.4.340.0030.03214.98
5.4.330.0080.00410.89
5.4.320.0050.03215.02
5.4.310.0030.03315.19
5.4.300.0020.02514.99
5.4.290.0050.03514.84
5.4.280.0060.02615.00
5.4.270.0050.03715.08
5.4.260.0060.04015.04
5.4.250.0020.02614.99
5.4.240.0050.02015.09
5.4.230.0070.02814.96
5.4.220.0000.03414.87
5.4.210.0070.02014.96
5.4.200.0050.02615.18
5.4.190.0020.02914.96
5.4.180.0070.02214.86
5.4.170.0070.02814.84
5.4.160.0000.02814.97
5.4.150.0050.02514.96
5.4.140.0040.02613.64
5.4.130.0070.02213.73
5.4.120.0080.02413.54
5.4.110.0060.02513.76
5.4.100.0070.03313.75
5.4.90.0050.03213.79
5.4.80.0050.02313.71
5.4.70.0060.01813.74
5.4.60.0070.02213.69
5.4.50.0050.02013.70
5.4.40.0070.02513.63
5.4.30.0120.02913.68
5.4.20.0030.02213.52
5.4.10.0020.02413.71
5.4.00.0020.02613.35
5.3.290.0070.03012.43
5.3.280.0050.04112.41
5.3.270.0020.02412.41
5.3.260.0050.02812.40
5.3.250.0020.02212.39
5.3.240.0040.02712.35
5.3.230.0070.02512.39
5.3.220.0020.02512.33
5.3.210.0080.03212.31
5.3.200.0080.02312.39
5.3.190.0150.01512.32
5.3.180.0040.02412.34
5.3.170.0050.02112.44
5.3.160.0020.03012.44
5.3.150.0070.02512.37
5.3.140.0080.03212.39
5.3.130.0050.02412.39
5.3.120.0070.03012.35
5.3.110.0060.02212.38
5.3.100.0070.02212.11
5.3.90.0020.02812.19
5.3.80.0060.02912.13
5.3.70.0120.01712.12
5.3.60.0070.02812.11
5.3.50.0030.03012.06
5.3.40.0020.02712.09
5.3.30.0060.02512.04
5.3.20.0030.02911.84
5.3.10.0130.02311.93
5.3.00.0020.03111.94
5.2.170.0050.02310.61
5.2.160.0020.02410.70
5.2.150.0050.02010.65
5.2.140.0050.02010.66
5.2.130.0050.01810.68
5.2.120.0020.01810.68
5.2.110.0050.02510.66
5.2.100.0050.02310.56
5.2.90.0030.02510.68
5.2.80.0050.02510.58
5.2.70.0030.03010.65
5.2.60.0050.03310.66
5.2.50.0050.02810.60
5.2.40.0030.01610.58
5.2.30.0060.01510.62
5.2.20.0050.01510.60
5.2.10.0020.01710.56
5.2.00.0020.02810.50
5.1.60.0000.02910.39
5.1.50.0000.02410.39
5.1.40.0050.02210.39
5.1.30.0000.02810.39
5.1.20.0020.02310.39
5.1.10.0040.01810.39
5.1.00.0030.02110.39
5.0.50.0070.01510.39
5.0.40.0030.01610.39
5.0.30.0020.01910.39
5.0.20.0010.01110.39
5.0.10.0030.01510.39
5.0.00.0050.02010.39
4.4.90.0020.01810.39
4.4.80.0000.01310.39
4.4.70.0000.01010.39
4.4.60.0030.00810.39
4.4.50.0020.00910.39
4.4.40.0020.01710.39
4.4.30.0020.01510.39
4.4.20.0050.00710.39
4.4.10.0020.01610.39
4.4.00.0020.02710.39
4.3.110.0020.00910.39
4.3.100.0010.01010.39
4.3.90.0030.00710.39
4.3.80.0020.01810.39
4.3.70.0020.01010.39
4.3.60.0020.01210.39
4.3.50.0040.00710.39
4.3.40.0020.02110.39
4.3.30.0080.00710.39
4.3.20.0010.01610.39
4.3.10.0010.01110.39
4.3.00.0030.01610.39

preferences:
47.55 ms | 400 KiB | 5 Q