3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $x = []; class person { public $firstname; public $lastname; } $start = microtime( true ); do { $p = new person; $p->firstname = "Patrick"; $p->lastname = "Allaert"; $x[] = $p; ++$i; } while ( $i < 500000 ); echo microtime( true ) - $start, "\n", memory_get_peak_usage(), "\n";

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)
7.3.60.0710.06172.47
7.3.50.0640.06972.51
7.3.40.0710.07572.54
7.3.30.0680.09472.52
7.3.20.7640.07172.66
7.3.10.4540.08473.50
7.3.00.5150.08673.52
7.2.190.0660.06972.56
7.2.180.0520.08672.85
7.2.170.0610.06872.19
7.2.160.0640.07472.42
7.2.150.7170.07372.78
7.2.140.4160.08572.71
7.2.130.5070.08373.33
7.2.120.6010.08373.47
7.2.110.8230.06366.30
7.2.100.5140.10073.58
7.2.90.6060.08973.64
7.2.80.4420.09273.44
7.2.70.8370.06772.27
7.2.60.6590.09173.47
7.2.50.5110.10173.58
7.2.40.3080.08073.42
7.2.30.4210.07873.55
7.2.20.2780.07673.54
7.2.10.1820.07973.57
7.2.00.1960.07974.71
7.1.300.0710.08471.92
7.1.290.0390.08571.87
7.1.280.1200.10072.56
7.1.270.0570.08572.10
7.1.260.0400.10571.96
7.1.250.5870.09772.38
7.1.240.6440.08771.52
7.1.230.8320.09071.53
7.1.221.1690.08266.69
7.1.210.6530.09171.54
7.1.200.6120.07671.66
7.1.190.6980.07271.59
7.1.180.6180.09671.44
7.1.170.2990.08871.66
7.1.160.3890.07971.34
7.1.150.6560.08871.39
7.1.140.3850.07671.51
7.1.130.5450.09471.68
7.1.120.3210.09771.65
7.1.110.2800.10171.62
7.1.101.1800.05862.18
7.1.91.2310.06668.18
7.1.80.0730.08772.02
7.1.70.0370.08173.75
7.1.60.1070.07873.83
7.1.50.0400.11373.54
7.1.40.1270.06771.91
7.1.30.1200.08072.07
7.1.20.0420.09971.91
7.1.10.1340.07271.72
7.1.00.0600.12276.29
7.0.330.3040.08671.17
7.0.320.6680.11071.36
7.0.310.5720.08971.10
7.0.300.3090.08471.30
7.0.290.5570.10271.20
7.0.280.2580.08671.11
7.0.270.2720.10071.35
7.0.260.4510.10671.38
7.0.250.4890.09271.43
7.0.241.2050.06762.01
7.0.231.1310.07866.61
7.0.221.1760.07965.13
7.0.210.0560.12271.82
7.0.200.0310.08673.43
7.0.190.0680.07571.67
7.0.180.0720.10271.54
7.0.170.0540.07671.72
7.0.160.0660.12071.70
7.0.150.0550.11271.72
7.0.140.0330.13276.12
7.0.130.0550.10371.61
7.0.120.0700.08371.58
7.0.110.1370.10771.46
7.0.100.0620.08171.61
7.0.90.0620.11171.55
7.0.80.1270.09871.54
7.0.70.0430.12175.81
7.0.60.0440.13075.89
7.0.50.0590.14275.98
7.0.40.0390.13357.05
7.0.30.0530.13657.25
7.0.20.0370.08957.04
7.0.10.0310.13156.91
7.0.00.0350.13957.16
5.6.400.0690.11372.72
5.6.390.0420.12772.80
5.6.380.0680.13072.88
5.6.370.0450.14272.68
5.6.360.0500.11072.76
5.6.350.0560.11472.91
5.6.340.0500.12472.60
5.6.330.0660.10672.63
5.6.320.0710.11272.61
5.6.310.0450.12172.55
5.6.300.0670.09472.95
5.6.290.0440.13172.71
5.6.280.0340.14676.93
5.6.270.0520.14672.67
5.6.260.0580.11772.74
5.6.250.0370.12772.94
5.6.240.0740.10072.68
5.6.230.0420.13272.47
5.6.220.0390.15175.85
5.6.210.0430.13176.41
5.6.200.0430.14276.90
5.6.190.0460.14377.04
5.6.180.0430.12875.84
5.6.170.0390.16276.78
5.6.160.0490.12577.24
5.6.150.0410.14176.86
5.6.140.0310.14675.83
5.6.130.0400.14375.90
5.6.120.0330.12976.61
5.6.110.0380.11675.88
5.6.100.0430.12575.96
5.6.90.0490.15576.35
5.6.80.0260.15076.01
5.6.70.0400.12675.60
5.6.60.0320.12576.25
5.6.50.0400.13976.01
5.6.40.0370.12475.49
5.6.30.0400.14676.17
5.6.20.0360.11876.20
5.6.10.0320.10176.21
5.6.00.0350.10876.19
5.5.380.0430.11772.72
5.5.370.0580.11672.43
5.5.360.0370.14676.51
5.5.350.0340.15676.27
5.5.340.0460.13776.79
5.5.330.0450.14276.78
5.5.320.0410.15776.46
5.5.310.0350.14175.76
5.5.300.0270.12776.48
5.5.290.0380.15176.67
5.5.280.0450.13375.80
5.5.270.0300.11976.71
5.5.260.0410.13476.01
5.5.250.0470.10976.57
5.5.240.0420.13276.10
5.5.230.0440.16176.05
5.5.220.0270.12776.16
5.5.210.0330.14575.60
5.5.200.0470.11376.50
5.5.190.0440.12275.54
5.5.180.0310.14176.26
5.5.170.0660.13272.75
5.5.160.0320.11276.23
5.5.150.0310.13276.26
5.5.140.0330.14975.27
5.5.130.0270.15776.29
5.5.120.0510.13176.05
5.5.110.0330.16276.19
5.5.100.0580.13776.07
5.5.90.0330.12775.34
5.5.80.0460.13676.45
5.5.70.0370.16776.22
5.5.60.0430.14676.18
5.5.50.0360.12776.27
5.5.40.0430.13376.21
5.5.30.0380.13175.89
5.5.20.0290.17376.34
5.5.10.0470.13176.18
5.5.00.0460.10876.08
5.4.450.0350.15174.04
5.4.440.0230.15773.88
5.4.430.0370.10973.68
5.4.420.0340.13274.36
5.4.410.0440.11374.46
5.4.400.0320.12674.02
5.4.390.0280.12074.05
5.4.380.0390.11273.28
5.4.370.0360.11673.60
5.4.360.0450.13473.69
5.4.350.0310.12773.28
5.4.340.0380.12573.21
5.4.330.0440.12669.36
5.4.320.0350.11674.15
5.4.310.0350.09873.92
5.4.300.0420.11973.26
5.4.290.0400.13773.99
5.4.280.0420.13573.96
5.4.270.0450.13973.24
5.4.260.0360.14573.13
5.4.250.0510.14474.16
5.4.240.0340.12273.98
5.4.230.0460.14173.17
5.4.220.0410.14874.13
5.4.210.0500.13273.94
5.4.200.0330.14873.83
5.4.190.0320.15573.85
5.4.180.0350.14773.18
5.4.170.0450.14473.15
5.4.160.0360.14373.24
5.4.150.0300.16273.13
5.4.140.0440.13572.68
5.4.130.0390.14471.94
5.4.120.0490.12972.05
5.4.110.0350.15472.48
5.4.100.0300.14771.99
5.4.90.0430.13571.94
5.4.80.0400.14272.84
5.4.70.0300.12372.48
5.4.60.0280.12771.91
5.4.50.0320.14372.57
5.4.40.0490.10672.73
5.4.30.0290.12272.52
5.4.20.0340.13872.83
5.4.10.0360.12672.69
5.4.00.0380.13672.23
5.3.290.0030.02412.40
5.3.280.0070.02112.33
5.3.270.0060.02012.33
5.3.260.0090.03212.43
5.3.250.0030.02412.39
5.3.240.0070.04112.34
5.3.230.0060.04412.35
5.3.220.0060.03312.25
5.3.210.0050.04512.29
5.3.200.0100.02812.27
5.3.190.0040.03912.39
5.3.180.0060.02812.30
5.3.170.0040.04212.33
5.3.160.0020.04412.36
5.3.150.0070.01812.40
5.3.140.0080.02812.23
5.3.130.0070.03912.31
5.3.120.0050.03212.44
5.3.110.0070.03612.36
5.3.100.0050.03612.11
5.3.90.0070.03012.02
5.3.80.0070.03011.88
5.3.70.0080.04312.07
5.3.60.0060.03312.08
5.3.50.0100.03811.96
5.3.40.0080.03511.81
5.3.30.0040.04012.00
5.3.20.0070.04011.91
5.3.10.0030.02311.76
5.3.00.0030.03811.76

preferences:
59.29 ms | 401 KiB | 5 Q