3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct() { $this->bar = new Bar($this); } } class Bar { function __construct($foo = null) { $this->foo = $foo; } } for($i=0;$i<50000;$i++) { $foo = new Foo(); unset($foo); echo number_format(memory_get_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.2.100.3280.01718.32
7.2.90.3910.01618.35
7.2.80.1920.01418.26
7.2.70.3420.02218.56
7.2.60.2400.02118.42
7.2.50.1740.01718.22
7.2.40.1660.02618.84
7.2.30.1180.03118.57
7.2.20.0490.01018.41
7.2.10.3020.01017.79
7.2.00.1260.00318.36
7.1.220.1850.01717.61
7.1.210.0440.01617.48
7.1.200.1970.00917.01
7.1.190.0580.01417.97
7.1.180.2790.01317.53
7.1.170.0490.02118.11
7.1.160.3350.01617.54
7.1.150.3080.01917.47
7.1.140.2110.00716.75
7.1.130.0500.00817.35
7.1.120.1020.01216.63
7.1.110.0760.02216.93
7.1.100.0310.01717.41
7.1.90.1070.02117.87
7.1.80.4960.02017.66
7.1.70.3100.02517.58
7.1.60.0580.02235.28
7.1.50.0490.01035.66
7.1.40.2850.02035.70
7.1.30.1090.02235.87
7.1.20.3050.02635.68
7.1.10.0380.02118.07
7.1.00.0930.02117.35
7.0.310.3700.01817.06
7.0.300.0970.01617.14
7.0.290.0670.01316.67
7.0.280.0410.02516.38
7.0.270.1590.01317.36
7.0.260.0280.02216.95
7.0.250.0900.02917.11
7.0.240.0250.02816.86
7.0.230.0230.02116.57
7.0.220.1440.00616.40
7.0.210.1080.01717.14
7.0.200.3690.01217.25
7.0.190.2660.01317.32
7.0.180.4070.02516.93
7.0.170.0470.01516.63
7.0.160.0430.00617.45
7.0.150.0840.02417.26
7.0.140.2070.01517.04
7.0.130.0350.01717.20
7.0.120.0260.01316.80
7.0.110.1460.01917.23
7.0.100.0760.03517.27
7.0.90.5100.01917.07
7.0.80.2170.03017.38
7.0.70.0960.01217.41
7.0.60.0770.01917.31
7.0.50.0970.02316.78
7.0.40.0790.01716.97
7.0.30.0390.02316.59
7.0.20.0760.02217.45
7.0.10.1810.01016.72
7.0.00.3880.00316.29
5.6.380.0230.02318.14
5.6.370.0140.02517.22
5.6.360.0200.01918.19
5.6.350.0250.03218.46
5.6.340.0340.02218.61
5.6.330.0160.02518.07
5.6.320.0140.02818.23
5.6.310.0210.02118.44
5.6.300.0180.03618.75
5.6.290.0090.04118.14
5.6.280.0170.02718.27
5.6.270.0100.03217.77
5.6.260.0220.03318.53
5.6.250.0210.02017.84
5.6.240.0200.03018.13
5.6.230.0340.01018.29
5.6.220.0080.03317.58
5.6.210.0190.01917.39
5.6.200.0160.01917.09
5.6.190.0260.01917.54
5.6.180.0390.03618.47
5.6.170.0310.04218.57
5.6.160.0210.02618.02
5.6.150.0280.02418.64
5.6.140.0250.02517.71
5.6.130.0300.03318.76
5.5.380.0160.03515.38
5.5.370.0170.03915.40
5.5.360.0190.02314.71
5.5.350.0260.02614.76
5.5.340.0300.01514.22
5.5.330.0170.03315.12
5.5.320.0160.01714.46
5.5.310.0180.02414.92
5.5.300.0240.01914.68

preferences:
36.53 ms | 400 KiB | 5 Q