3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $number; function __construct($int) { $this->number = $int; } } $i = 10; $test = array(); $string = ""; while ($i >1) { $string .= $i; $i-1; $test[] = new test($i); } echo count($test); echo "<br><br>".$string;

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.0640.10163.50
8.3.50.0700.08963.37
8.3.40.0340.05542.26
8.3.30.0460.03042.08
8.3.20.0180.02544.12
8.3.10.0160.02545.66
8.3.00.0030.03141.78
8.2.180.0560.07963.84
8.2.170.0440.03442.51
8.2.160.0430.03044.49
8.2.150.0230.02042.38
8.2.140.0070.02344.98
8.2.130.0240.02041.99
8.2.120.0170.02741.13
8.2.110.0160.03642.79
8.2.100.0240.03741.14
8.2.90.0130.03542.80
8.2.80.0180.03241.23
8.2.70.0070.04241.05
8.2.60.0150.04641.65
8.2.50.0140.03740.95
8.2.40.0070.03743.28
8.2.30.0130.03341.91
8.2.20.0170.03341.35
8.2.10.0140.03541.73
8.2.00.0070.04141.63
8.1.280.0460.08671.27
8.1.270.0350.04147.88
8.1.260.0290.01646.48
8.1.250.0100.03150.22
8.1.240.0100.03748.57
8.1.230.0270.04145.12
8.1.220.0200.03345.41
8.1.210.0030.05045.00
8.1.200.0260.02945.05
8.1.190.0100.04244.89
8.1.180.0200.03345.26
8.1.170.0100.04046.19
8.1.160.0200.03049.61
8.1.150.0100.04146.53
8.1.140.0100.04445.10
8.1.130.0200.03145.27
8.1.120.0130.03645.09
8.1.110.0190.03245.08
8.1.100.0160.03645.15
8.1.90.0130.05044.99
8.1.80.0180.03545.07
8.1.70.0130.03745.11
8.1.60.0130.04045.18
8.1.50.0200.03345.20
8.1.40.0070.04745.24
8.1.30.0100.04445.21
8.1.20.0130.04045.20
8.1.10.0300.07072.45
8.1.00.0360.06972.43
8.0.300.0230.07671.73
8.0.290.0340.06571.37
8.0.280.0130.08373.05
8.0.270.0240.07571.95
8.0.260.0370.05871.78
8.0.250.0130.08471.58
8.0.240.0500.09771.40
8.0.230.0230.07671.59
8.0.220.0230.07271.44
8.0.210.0460.07371.44
8.0.200.0240.07471.53
8.0.190.0320.07671.41
8.0.180.0260.07871.52
8.0.170.0310.07371.56
8.0.160.0460.05971.50
8.0.150.0370.06771.38
8.0.140.0270.07671.42
8.0.130.0470.157122.42
8.0.120.0500.05771.32
8.0.110.0240.07871.47
8.0.100.0260.07571.31
8.0.90.0100.08771.41
8.0.80.0660.18671.42
8.0.70.0330.07071.41
8.0.60.0200.08271.32
8.0.50.0200.07771.34
8.0.30.0740.10471.75
8.0.20.0800.19271.70
8.0.10.0300.07171.46
8.0.00.0730.19471.21
7.4.330.0270.06168.45
7.4.320.0260.07371.07
7.4.300.0340.06771.22
7.4.290.0360.06670.98
7.4.280.0470.11271.14
7.4.270.0280.08271.27
7.4.260.0300.07471.03
7.4.250.0330.07771.09
7.4.240.0300.07271.06
7.4.230.0320.08571.04
7.4.220.1050.18570.98
7.4.210.0640.11471.10
7.4.200.0270.08471.17
7.4.160.0820.13871.19
7.4.150.0950.19571.30
7.4.140.0760.18771.00
7.4.130.0840.17871.23
7.4.120.0930.15871.12
7.4.110.0730.14371.08
7.4.100.0790.17471.16
7.4.90.0810.14370.93
7.4.80.0790.16070.99
7.4.70.0880.13170.90
7.4.60.0950.21171.18
7.4.50.0260.06970.77
7.4.40.0660.14570.99
7.4.30.0890.14971.10
7.4.00.0300.10769.55
7.3.330.0680.212122.31
7.3.320.0630.140122.44
7.3.310.0230.08070.88
7.3.300.0210.07970.86
7.3.290.0630.14370.97
7.3.280.0750.15670.94
7.3.270.0910.13970.98
7.3.260.0830.13371.13
7.3.250.0880.19870.93
7.3.240.0680.15671.07
7.3.230.0790.14971.07
7.3.210.0790.15171.05
7.3.200.1030.16671.09
7.3.190.0600.16171.15
7.3.180.0950.18671.18
7.3.170.0810.23071.03
7.3.160.0970.15071.23
7.3.10.1130.09771.09
7.3.00.1490.11571.04
7.2.330.0940.19471.02
7.2.320.0720.18570.67
7.2.310.1010.22171.00
7.2.300.0780.16370.90
7.2.290.0920.14170.84
7.2.130.1030.12470.96
7.2.120.0900.13971.05
7.2.110.0750.12371.19
7.2.100.0900.11371.03
7.2.90.1350.12271.12
7.2.80.1560.12070.84
7.2.70.1560.12771.19
7.2.60.1460.12971.05
7.2.50.1410.13370.99
7.2.40.0870.13271.05
7.2.30.1230.12571.25
7.2.20.1370.13771.17
7.2.10.1090.12571.16
7.2.00.0510.14772.45
7.1.250.0820.17969.76
7.1.200.1450.10370.19
7.1.100.1220.11572.13
7.1.70.0800.11371.41
7.1.60.0130.15871.75
7.1.50.0220.11889.28
7.1.00.0070.20776.48
7.0.200.4600.12969.77
7.0.60.0370.19374.51
7.0.50.0400.18772.47
7.0.40.0070.15042.10
7.0.30.1000.17341.92
7.0.20.0970.17342.08
7.0.10.0130.18342.17
7.0.00.0300.18042.16
5.6.280.0230.19382.30
5.6.210.0170.16381.61
5.6.200.0300.14779.16
5.6.190.0200.15081.43
5.6.180.4730.12381.44
5.6.170.0470.13781.23
5.6.160.0100.15381.22
5.6.150.0300.19379.16
5.6.140.0230.20779.11
5.6.130.0230.14779.18
5.6.120.0100.20082.05
5.6.110.0300.19782.13
5.6.100.0200.20782.11
5.6.90.0170.20082.10
5.6.80.0230.21081.39
5.6.70.7200.14781.52
5.5.350.0330.17081.39
5.5.340.0170.15379.04
5.5.330.0230.15381.22
5.5.320.0600.15781.19
5.5.310.0400.20381.19
5.5.300.0230.17078.89
5.5.290.0200.15378.94
5.5.280.0270.15081.75
5.5.270.0200.20781.76
5.5.260.0270.20381.79
5.5.250.0400.20081.61
5.5.240.0730.20081.18
5.4.450.1270.28380.48
5.4.440.1530.29380.32
5.4.430.1800.26780.06
5.4.420.1370.33780.25
5.4.410.1370.26380.38
5.4.400.1200.25079.79
5.4.390.1170.30379.79
5.4.380.0970.23380.09
5.4.370.1330.33780.01
5.4.360.1370.23080.05
5.4.350.1530.30780.07
5.4.340.1500.27079.98
5.4.320.1570.27779.76
5.4.310.1430.36779.91
5.4.300.1600.26780.02
5.4.290.1570.33379.75
5.4.280.1470.26379.98
5.4.270.1600.34080.20
5.4.260.1470.20080.05
5.4.250.1670.31380.28
5.4.240.1400.26380.19
5.4.230.1470.22079.95
5.4.220.1070.23779.80
5.4.210.1600.21779.89
5.4.200.1400.23777.85
5.4.190.1600.22779.82
5.4.180.1130.26079.86
5.4.170.1300.26779.93
5.4.160.1400.32380.03
5.4.150.1530.34779.82
5.4.140.1330.27077.27
5.4.130.1570.31377.27
5.4.120.1930.27777.27
5.4.110.1770.25377.28
5.4.100.1400.24777.31
5.4.90.1630.28777.69
5.4.80.1430.26377.46
5.4.70.1500.26377.37
5.4.60.1770.25077.32
5.4.50.2030.35377.34
5.4.40.1830.29077.30
5.4.30.1570.27077.42
5.4.20.1430.24777.25
5.4.10.1670.26077.24
5.4.00.1630.25376.96

preferences:
52.29 ms | 401 KiB | 5 Q