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); if($i % 10000 == 0) { 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.4.10.0070.06718.95
7.4.00.0070.08418.77
7.3.130.0030.08118.76
7.3.120.0070.08919.02
7.3.110.0070.08818.82
7.3.100.0070.04818.93
7.3.90.0030.06219.10
7.3.80.0040.03918.59
7.3.70.0100.04518.93
7.3.60.0070.04718.94
7.3.50.0030.05518.69
7.3.40.0070.04318.78
7.3.30.0130.04818.95
7.3.20.0070.04320.54
7.3.10.0070.03320.41
7.3.00.0070.04420.54
7.2.260.0050.09719.02
7.2.250.0130.09219.20
7.2.240.0030.04719.13
7.2.230.0030.06118.89
7.2.220.0100.06519.15
7.2.210.0100.04619.29
7.2.200.0000.06418.99
7.2.190.0070.05719.10
7.2.180.0070.06719.27
7.2.170.0030.05519.00
7.2.160.0100.05619.07
7.2.150.0030.05321.00
7.2.140.0100.04520.90
7.2.130.0070.05921.07
7.2.120.0030.05520.87
7.2.110.0100.04520.90
7.2.100.0030.05121.18
7.2.90.0070.04921.11
7.2.80.0100.05521.08
7.2.70.0100.05320.87
7.2.60.0070.04920.81
7.2.50.0060.05420.98
7.2.40.0070.06021.09
7.2.30.0030.05021.09
7.2.20.0070.05020.93
7.2.10.0060.04821.02
7.2.00.0080.04122.39
7.1.330.0070.05120.07
7.1.320.0130.05119.84
7.1.310.0100.04619.85
7.1.300.0030.06819.61
7.1.290.0130.05819.87
7.1.280.0030.05219.72
7.1.270.0100.05619.88
7.1.260.0030.05519.71
7.1.250.0060.05819.95
7.1.240.0060.05519.89
7.1.230.0070.05319.68
7.1.220.0030.06819.91
7.1.210.0000.05420.01
7.1.200.0030.06419.82
7.1.190.0000.05819.71
7.1.180.0030.07119.77
7.1.170.0070.04819.66
7.1.160.0100.06919.89
7.1.150.0030.06820.04
7.1.140.0070.06620.06
7.1.130.0070.05119.98
7.1.120.0000.08219.84
7.1.110.0070.07319.90
7.1.100.0100.05419.88
7.1.90.0060.05219.92
7.1.80.0000.07019.96
7.1.70.0030.06020.50
7.1.60.0100.08120.60
7.1.50.0070.07020.53
7.1.40.0030.06019.89
7.1.30.0030.05219.95
7.1.20.0100.05619.73
7.1.10.0100.06019.86
7.1.00.0020.09323.14
7.0.330.0000.05019.55
7.0.320.0000.04819.51
7.0.310.0030.04219.60
7.0.300.0030.04219.51
7.0.290.0070.05419.50
7.0.280.0100.03919.57
7.0.270.0100.03719.66
7.0.260.0100.04919.39
7.0.250.0030.04519.48
7.0.240.0030.05219.41
7.0.230.0030.05019.64
7.0.220.0070.05419.61
7.0.210.0130.07219.63
7.0.200.0050.03920.13
7.0.190.0030.05819.48
7.0.180.0030.04019.68
7.0.170.0070.03619.72
7.0.160.0070.04619.76
7.0.150.0070.06319.62
7.0.140.0070.07022.96
7.0.130.0070.04619.48
7.0.120.0030.03819.70
7.0.110.0060.04619.35
7.0.100.0070.06219.40
7.0.90.0100.07519.43
7.0.80.0000.07319.52
7.0.70.0070.04619.87
7.0.60.0130.06821.85
7.0.50.0070.07520.85
7.0.40.0110.07716.91
7.0.30.0220.05517.18
7.0.20.0170.06816.96
7.0.10.0050.06417.08
7.0.00.0050.06616.96
5.6.400.0130.08418.78
5.6.390.0100.09719.04
5.6.380.0100.08618.97
5.6.370.0100.11918.80
5.6.360.0030.10919.08
5.6.350.0130.08818.59
5.6.340.0070.10318.76
5.6.330.0070.10618.53
5.6.320.0190.08018.71
5.6.310.0070.09418.98
5.6.300.0030.11518.77
5.6.290.0070.09119.14
5.6.280.0050.12022.09
5.6.270.0100.08218.72
5.6.260.0000.12818.89
5.6.250.0030.10218.50
5.6.240.0160.11118.72
5.6.230.0070.08818.73
5.6.220.0070.08918.64
5.6.210.0080.11521.80
5.6.200.0100.11720.54
5.6.190.0080.10621.77
5.6.180.0180.12421.80
5.6.170.0220.11821.75
5.6.160.0080.12921.78
5.6.150.0120.09520.63
5.6.140.0100.12120.50
5.6.130.0120.11520.72
5.6.120.0130.12522.01
5.6.110.0050.11522.06
5.6.100.0170.09522.14
5.6.90.0150.11321.98
5.6.80.0020.12121.74
5.6.70.0030.11218.57
5.6.60.0100.09618.79
5.6.50.0060.09419.04
5.6.40.0070.09518.45
5.6.30.0030.10918.58
5.6.20.0100.09718.76
5.6.10.0160.08418.70
5.6.00.0130.08718.71
5.5.380.0030.10618.74
5.5.370.0070.08418.57
5.5.360.0130.08718.79
5.5.350.2100.09921.64
5.5.340.0170.11920.37
5.5.330.0050.09421.63
5.5.320.0130.10221.64
5.5.310.0170.12621.65
5.5.300.0050.09720.50
5.5.290.0150.13320.61
5.5.280.0120.13021.79
5.5.270.0170.11322.10
5.5.260.0070.08621.97
5.5.250.0120.11521.88
5.5.240.0080.09521.63
5.5.230.0070.08618.64
5.5.220.0070.08518.45
5.5.210.0100.11118.70
5.5.200.0140.07818.43
5.5.190.0100.09018.66
5.5.180.0070.11618.79
5.5.170.0070.12518.60
5.5.160.0030.09018.85
5.5.150.0030.11118.62
5.5.140.0100.13018.70
5.5.130.0030.10518.76
5.5.120.0100.10318.70
5.5.110.0030.11318.55
5.5.100.0100.08418.77
5.5.90.0100.09218.43
5.5.80.0000.09218.70
5.5.70.0070.09218.71
5.5.60.0130.08418.47
5.5.50.0070.08818.65
5.5.40.0070.10518.50
5.5.30.0100.08618.38
5.5.20.0170.08618.40
5.5.10.0070.10518.77
5.5.00.0100.08418.61
5.4.450.0480.12619.62
5.4.440.0170.14119.63
5.4.430.0380.11219.66
5.4.420.0120.12919.68
5.4.410.0200.11019.63
5.4.400.0120.13519.38
5.4.390.0130.14519.48
5.4.380.0420.11919.44
5.4.370.0480.10319.43
5.4.360.0530.12219.38
5.4.350.0270.13419.52
5.4.340.0070.10216.03
5.4.330.0130.10015.33
5.4.320.0070.09116.23
5.4.310.0080.12216.34
5.4.300.0070.10516.30
5.4.290.0090.11716.18
5.4.280.0080.09816.18
5.4.270.0050.09916.05
5.4.260.0090.08616.19
5.4.250.0100.11415.99
5.4.240.0080.10216.14
5.4.230.0090.11116.14
5.4.220.0040.10416.14
5.4.210.0070.09216.26
5.4.200.0070.10216.30
5.4.190.0070.09716.20
5.4.180.0120.10716.14
5.4.170.0070.11916.22
5.4.160.0040.09816.09
5.4.150.0100.09316.19
5.4.140.0070.11116.02
5.4.130.0050.10216.03
5.4.120.0010.09616.04
5.4.110.0070.10015.88
5.4.100.0080.10715.91
5.4.90.0090.09015.92
5.4.80.0060.09016.00
5.4.70.0080.10215.97
5.4.60.0060.09215.99
5.4.50.0040.11916.11
5.4.40.0050.09115.96
5.4.30.0080.10316.01
5.4.20.0090.08915.92
5.4.10.0070.10216.01
5.4.00.0100.09315.73
5.3.290.0060.11217.08
5.3.280.0050.11617.01
5.3.270.0070.10617.02
5.3.260.0050.10217.02
5.3.250.0100.09817.02
5.3.240.0080.09617.02
5.3.230.0090.09617.01
5.3.220.0070.10216.98
5.3.210.0110.09716.98
5.3.200.0060.10016.98
5.3.190.0080.10516.98
5.3.180.0040.10016.98
5.3.170.0100.09416.98
5.3.160.0070.09616.98
5.3.150.0070.10416.98
5.3.140.0070.11016.97
5.3.130.0060.10216.96
5.3.120.0050.10016.96
5.3.110.0080.10916.96
5.3.100.0050.10216.46
5.3.90.0150.09416.44
5.3.80.0060.09816.43
5.3.70.0110.10116.43
5.3.60.0070.09816.41
5.3.50.0060.09516.36
5.3.40.0110.09316.36
5.3.30.0060.10216.32
5.3.20.0090.11216.10
5.3.10.0070.09916.06
5.3.00.0130.11016.05
5.2.170.0260.10646.92
5.2.160.0170.11046.58
5.2.150.0150.10746.58
5.2.140.0200.10146.58
5.2.130.0190.09746.54
5.2.120.0120.11046.54
5.2.110.0150.11046.54
5.2.100.0150.10046.54
5.2.90.0130.10346.55
5.2.80.0180.09246.53
5.2.70.0160.11646.53
5.2.60.0230.10246.49
5.2.50.0210.10846.42
5.2.40.0180.11646.40
5.2.30.0210.11946.37
5.2.20.0140.11446.36
5.2.10.0180.11446.27
5.2.00.0040.0368.81
5.1.60.0030.0258.10
5.1.50.0040.0268.09
5.1.40.0050.0258.07
5.1.30.0040.0298.42
5.1.20.0060.0378.45
5.1.10.0060.0258.17
5.1.00.0050.0318.17
5.0.50.0040.0276.65
5.0.40.0030.0236.50
5.0.30.0080.0366.32
5.0.20.0030.0216.29
5.0.10.0080.0246.26
5.0.00.0020.0366.25
4.4.90.0040.0144.77
4.4.80.0040.0144.76
4.4.70.0000.0184.75
4.4.60.0040.0144.76
4.4.50.0040.0144.77
4.4.40.0010.0274.70
4.4.30.0020.0164.76
4.4.20.0030.0174.85
4.4.10.0020.0184.85
4.4.00.0030.0254.75
4.3.110.0030.0204.67
4.3.100.0010.0164.66
4.3.90.0010.0174.63
4.3.80.0040.0234.58
4.3.70.0040.0134.63
4.3.60.0040.0134.62
4.3.50.0010.0174.63
4.3.40.0030.0244.53
4.3.30.0020.0163.31
4.3.20.0010.0173.29
4.3.10.0030.0163.24
4.3.00.0000.0236.99

preferences:
39.69 ms | 401 KiB | 5 Q