3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 10000000; $t = -microtime(true); $j = 0; $k = 0; for ($i = 0; $i < $n; $i++) { $j++; $k += 1; } printf("%.2f\n", $t + microtime(true)); $t = -microtime(true); $a = []; $j = 0; $k = 0; for ($i = 0; $i < $n; $i++) { $j++; $k += ($a[$i] ?? 1); } printf("%.2f\n", $t + microtime(true));

Abusive script

This script was stopped while abusing our resources

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.0.00.0130.41216.67
7.4.130.0110.59416.28
7.4.120.0070.58916.38
7.4.110.0200.58516.27
7.4.100.0140.59216.31
7.4.90.0110.66616.38
7.4.80.0160.64016.23
7.4.70.0170.62216.19
7.4.60.0130.59916.19
7.4.50.0180.56416.32
7.4.40.0130.60716.36
7.4.30.0150.61416.40
7.4.20.0210.60516.30
7.4.10.0130.67916.48
7.4.00.0160.61016.52
7.3.250.0190.86816.51
7.3.240.0230.87016.34
7.3.230.0210.84216.15
7.3.220.0170.66116.30
7.3.210.0110.86216.39
7.3.200.0220.86416.38
7.3.190.0300.91716.18
7.3.180.0200.87216.07
7.3.170.0140.89116.34
7.3.160.0180.94716.40
7.3.150.0110.88216.35
7.3.140.0060.84816.40
7.3.130.0190.86516.36
7.3.120.0300.94016.34
7.3.110.0150.97016.31
7.3.100.0130.99016.35
7.3.90.0210.89016.40
7.3.80.0190.88116.29
7.3.70.0110.87816.41
7.3.60.0200.88816.23
7.3.50.0210.86116.31
7.3.40.0180.87816.22
7.3.30.0320.86716.31
7.3.20.0380.91416.26
7.3.10.0200.83916.29
7.3.00.0160.87516.25
7.2.340.0200.85116.57
7.2.330.0360.87416.59
7.2.320.0320.84116.67
7.2.310.0260.75216.63
7.2.300.0160.76516.55
7.2.290.0240.81016.57
7.2.280.0190.81016.61
7.2.270.0170.72216.48
7.2.260.0320.75016.55
7.2.250.0390.84316.61
7.2.240.0330.88116.63
7.2.230.0250.87016.73
7.2.220.0240.74616.54
7.2.210.0210.78916.75
7.2.200.0200.76216.52
7.2.190.0180.74816.58
7.2.180.0240.86916.56
7.2.170.0190.74816.61
7.2.160.0370.73916.65
7.2.150.0300.72316.74
7.2.140.0750.72316.59
7.2.130.0200.74416.62
7.2.120.0270.78416.67
7.2.110.0360.95916.71
7.2.100.0310.99616.66
7.2.90.0280.74016.61
7.2.80.0260.85916.65
7.2.70.0440.79916.49
7.2.60.0270.80816.69
7.2.50.0330.77116.42
7.2.40.0500.75217.10
7.2.30.0460.77917.10
7.2.20.0510.75216.91
7.2.10.0460.78217.05
7.2.00.0870.74117.06
7.1.330.0431.35015.54
7.1.320.0371.28115.68
7.1.310.0231.28615.72
7.1.300.0321.28515.65
7.1.290.0311.24015.57
7.1.280.0361.18115.66
7.1.270.0331.34915.66
7.1.260.0441.15415.57
7.1.250.0321.14215.57
7.1.240.0261.29815.66
7.1.230.0351.38415.63
7.1.220.0361.28215.53
7.1.210.0291.19615.58
7.1.200.0431.40415.61
7.1.190.0331.19515.38
7.1.180.0311.30715.54
7.1.170.0261.17015.53
7.1.160.0461.06715.93
7.1.150.0521.14415.96
7.1.140.0571.01215.95
7.1.130.0621.10415.94
7.1.120.0541.10115.80
7.1.110.0421.08315.77
7.1.100.0551.03615.84
7.1.90.0531.07415.86
7.1.80.0671.27815.81
7.1.70.0411.08215.49
7.1.60.0601.02421.49
7.1.50.0661.08621.40
7.1.40.0611.01921.42
7.1.30.0751.02521.35
7.1.20.0690.98721.40
7.1.10.0551.14115.34
7.1.00.0571.14115.26
7.0.330.0291.27215.30
7.0.320.0411.17415.37
7.0.310.0321.26515.33
7.0.300.0231.32215.44
7.0.290.0241.31515.35
7.0.280.0241.21215.38
7.0.270.0231.19115.38
7.0.260.0151.49515.44
7.0.250.0341.33915.44
7.0.240.0231.32115.41
7.0.230.0211.27415.45
7.0.220.0271.25215.48
7.0.210.0321.27915.41
7.0.200.0351.27815.35
7.0.190.0351.17815.45
7.0.180.0251.20215.40
7.0.170.0231.26915.37
7.0.160.0381.40715.31
7.0.150.0171.28715.37
7.0.140.0251.18615.32
7.0.130.0261.17815.43
7.0.120.0211.25815.40
7.0.110.0321.16015.44
7.0.100.0441.16015.45
7.0.90.0311.18415.40
7.0.80.0311.37015.36
7.0.70.0251.27815.34
7.0.60.0231.32215.42
7.0.50.0331.26415.39
7.0.40.0241.22515.39
7.0.30.0211.25715.37
7.0.20.0261.24715.37
7.0.10.0351.20815.41
7.0.00.0311.25815.34
5.6.400.0160.01415.85
5.6.390.0170.00715.66
5.6.380.0260.00715.57
5.6.370.0140.01215.47
5.6.360.0170.01315.49
5.6.350.0230.01515.71
5.6.340.0190.01215.53
5.6.330.0210.00715.69
5.6.320.0250.00715.57
5.6.310.0170.01415.79
5.6.300.0200.01215.64
5.6.290.0210.00815.65
5.6.280.0200.01015.53
5.6.270.0220.00815.65
5.6.260.0220.00815.77
5.6.250.0170.01215.63
5.6.240.0190.01515.75
5.6.230.0240.00715.69
5.6.220.0270.00615.67
5.6.210.0240.01015.71
5.6.200.0180.01215.70
5.6.190.0180.01315.63
5.6.180.0240.00815.59
5.6.170.0200.01115.73
5.6.160.0180.01115.65
5.6.150.0220.01015.69
5.6.140.0190.01215.58
5.6.130.0240.00715.59
5.6.120.0160.01215.53
5.6.110.0270.01915.64
5.6.100.0180.00915.59
5.6.90.0240.00715.57
5.6.80.0200.01015.55
5.6.70.0250.00715.56
5.6.60.0180.01515.52
5.6.50.0230.00815.57
5.6.40.0210.01015.61
5.6.30.0180.00815.56
5.6.20.0080.02015.51
5.6.10.0220.00415.46
5.6.00.0180.00915.51

preferences:
54.85 ms | 403 KiB | 5 Q