3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Item { public static function &newWithParent(Item $parent) { $item = new Item(); $item->parent = $parent; return $item; } private $parent; public function &getParent() { return $this->parent; } } $item = Item::newWithParent(Item::newWithParent(Item::newWithParent(new Item()))); // Basically it's this now: {"parent":{"parent":{"parent":{"parent":null}}}} // I want to set that null value var_dump($item); do { $item = $item->getParent(); if ($item->getParent() === null) { $item = Item::newWithParent($item); break; } } while (true); var_dump($item);

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.0070.01718.43
8.3.50.0090.01021.14
8.3.40.0000.01518.84
8.3.30.0040.01118.86
8.3.20.0030.00518.90
8.3.10.0000.00819.33
8.3.00.0040.00423.71
8.2.180.0070.01416.75
8.2.170.0070.01422.96
8.2.160.0080.00620.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00221.04
8.2.110.0030.00622.07
8.2.100.0030.00919.25
8.2.90.0040.00419.22
8.2.80.0080.00019.38
8.2.70.0090.00017.63
8.2.60.0030.00617.68
8.2.50.0000.00918.07
8.2.40.0000.00918.03
8.2.30.0000.00719.72
8.2.20.0030.00417.67
8.2.10.0040.00417.69
8.2.00.0070.00017.63
8.1.280.0060.00925.92
8.1.270.0080.00023.99
8.1.260.0030.01026.35
8.1.250.0060.00328.09
8.1.240.0090.00023.84
8.1.230.0040.00719.15
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00717.36
8.1.190.0000.00817.53
8.1.180.0080.00018.61
8.1.170.0060.00318.63
8.1.160.0050.00218.84
8.1.150.0070.00018.50
8.1.140.0000.00817.32
8.1.130.0000.00817.88
8.1.120.0040.00417.33
8.1.110.0040.00417.32
8.1.100.0050.00217.41
8.1.90.0040.00417.43
8.1.80.0030.00417.48
8.1.70.0030.00317.31
8.1.60.0000.00717.57
8.1.50.0070.00017.39
8.1.40.0000.00717.52
8.1.30.0000.00817.64
8.1.20.0030.00517.64
8.1.10.0000.00817.59
8.1.00.0030.00617.35
8.0.300.0000.00718.77
8.0.290.0040.00417.03
8.0.280.0000.00718.39
8.0.270.0000.00717.12
8.0.260.0070.00016.83
8.0.250.0000.00816.84
8.0.240.0000.00816.96
8.0.230.0000.00716.96
8.0.220.0040.00416.93
8.0.210.0040.00416.97
8.0.200.0030.00316.98
8.0.190.0080.00016.95
8.0.180.0000.00716.96
8.0.170.0000.00716.90
8.0.160.0000.00716.97
8.0.150.0040.00416.89
8.0.140.0000.00716.86
8.0.130.0060.00013.27
8.0.120.0050.00316.89
8.0.110.0000.00816.92
8.0.100.0000.00717.00
8.0.90.0040.00416.80
8.0.80.0130.01016.96
8.0.70.0000.00716.95
8.0.60.0040.00416.96
8.0.50.0080.00016.71
8.0.30.0120.00817.01
8.0.20.0080.01017.40
8.0.10.0090.00017.09
8.0.00.0090.00816.91
7.4.330.0030.00314.78
7.4.320.0000.00716.66
7.4.300.0030.00316.54
7.4.290.0000.00716.54
7.4.280.0040.00416.40
7.4.270.0040.00416.55
7.4.260.0060.00013.21
7.4.250.0000.00716.50
7.4.240.0030.00316.44
7.4.230.0070.00016.51
7.4.220.0090.00916.47
7.4.210.0110.00616.57
7.4.200.0070.00016.45
7.4.190.0030.00316.42
7.4.160.0150.00016.31
7.4.150.0090.00917.40
7.4.140.0110.00617.86
7.4.130.0050.01216.64
7.4.120.0060.01116.48
7.4.110.0070.01116.58
7.4.100.0140.00316.56
7.4.90.0090.01616.48
7.4.80.0070.01019.37
7.4.70.0110.00816.45
7.4.60.0110.00716.52
7.4.50.0030.00616.55
7.4.40.0130.00322.52
7.4.30.0110.01116.48
7.4.00.0030.01015.09
7.3.330.0030.00313.37
7.3.320.0050.00013.31
7.3.310.0000.00716.40
7.3.300.0070.00016.39
7.3.290.0110.00316.39
7.3.280.0030.01116.39
7.3.270.0030.01417.40
7.3.260.0070.01018.24
7.3.250.0060.01216.34
7.3.240.0170.00616.32
7.3.230.0030.01416.44
7.3.210.0100.01016.46
7.3.200.0100.01319.39
7.3.190.0080.00816.34
7.3.180.0100.01016.30
7.3.170.0130.00316.28
7.3.160.0070.00816.32
7.3.120.0070.01014.77
7.3.10.0090.00616.63
7.3.00.0030.01316.59
7.2.330.0090.01316.67
7.2.320.0100.00916.72
7.2.310.0110.00816.78
7.2.300.0150.00616.65
7.2.290.0080.00916.60
7.2.130.0040.01216.78
7.2.120.0060.00816.88
7.2.110.0070.01017.10
7.2.100.0080.00416.95
7.2.90.0070.00716.76
7.2.80.0040.00816.93
7.2.70.0090.00616.96
7.2.60.0080.00817.09
7.2.50.0060.00916.95
7.2.40.0030.01216.44
7.2.30.0070.00716.86
7.2.20.0110.00416.94
7.2.10.0070.01017.06
7.2.00.0050.01018.09
7.1.250.0040.00715.91
7.1.100.0040.00717.69
7.1.70.0070.00317.21
7.1.60.0100.01019.40
7.1.50.0040.00716.90
7.1.00.0030.04722.54
7.0.200.0000.00716.69
7.0.140.0100.06322.11
7.0.70.0030.08321.82
7.0.60.0000.08721.74
7.0.50.0100.07322.01
7.0.40.0070.08320.15
7.0.30.0100.05020.15
7.0.20.0000.08720.12
7.0.10.0100.08020.17
7.0.00.0100.08020.08
5.6.280.0100.06720.86
5.6.220.0100.07720.59
5.6.210.0030.08720.53
5.6.200.0000.09321.06
5.6.190.0100.04321.01
5.6.180.0030.08721.14
5.6.170.0030.09020.97
5.6.160.0030.06321.14
5.6.150.0070.07721.05
5.6.140.0070.08021.04
5.6.130.0030.06321.09
5.6.120.0030.08721.06
5.6.110.0070.08321.04
5.6.100.0070.08321.09
5.6.90.0070.08321.11
5.6.80.0030.08020.52
5.6.70.0130.06020.48
5.6.60.0100.04720.46
5.6.50.0070.08020.33
5.6.40.0030.07720.44
5.6.30.0100.07720.39
5.6.20.0100.05320.32
5.6.10.0070.08020.38
5.6.00.0070.06720.48
5.5.360.0030.08720.56
5.5.350.0100.06020.47
5.5.340.0030.05320.77
5.5.330.0000.05020.77
5.5.320.0030.08020.93
5.5.310.0070.06020.64
5.5.300.0100.07020.89
5.5.290.0200.07020.89
5.5.280.0100.07720.61
5.5.270.0100.08020.79
5.5.260.0030.09020.91
5.5.250.0130.07320.64
5.5.240.0030.08020.22
5.5.230.0000.06320.18
5.5.220.0000.04320.14
5.5.210.0070.05020.18
5.5.200.0000.05020.09
5.5.190.0070.06720.22
5.5.180.0030.08720.28
5.5.160.0070.07720.23
5.5.150.0070.04320.09
5.5.140.0000.07720.24
5.5.130.0100.07720.15
5.5.120.0070.08020.28
5.5.110.0070.08020.16
5.5.100.0000.05720.08
5.5.90.0070.07320.16
5.5.80.0070.08020.05
5.5.70.0030.08020.10
5.5.60.0100.07020.06
5.5.50.0030.04720.09
5.5.40.0070.06020.08
5.5.30.0070.03720.08
5.5.20.0100.05319.99
5.5.10.0030.04320.05
5.5.00.0030.06020.01
5.4.450.0000.08719.27
5.4.440.0170.06719.27
5.4.430.0070.05719.37
5.4.420.0030.08319.35
5.4.410.0030.06719.29
5.4.400.0030.07718.88
5.4.390.0000.06319.04
5.4.380.0030.07019.16
5.4.370.0000.06319.16
5.4.360.0130.06719.13
5.4.350.0070.07718.85
5.4.340.0030.06019.11
5.4.320.0130.06718.84
5.4.310.0070.07319.16
5.4.300.0000.08019.02
5.4.290.0000.08018.84
5.4.280.0030.06718.85
5.4.270.0170.06719.00
5.4.260.0000.06018.95
5.4.250.0030.04019.22
5.4.240.0030.07719.12
5.4.230.0070.06319.22
5.4.220.0000.06019.02
5.4.210.0070.07319.14
5.4.200.0030.05019.13
5.4.190.0030.07718.89
5.4.180.0030.07719.16
5.4.170.0000.08318.89
5.4.160.0030.05019.14
5.4.150.0030.03718.88
5.4.140.0030.07716.45
5.4.130.0070.05316.46
5.4.120.0030.06716.43
5.4.110.0030.07016.39
5.4.100.0070.07316.43
5.4.90.0030.07316.55
5.4.80.0070.06716.45
5.4.70.0070.04716.41
5.4.60.0000.07316.37
5.4.50.0100.06716.49
5.4.40.0030.06016.36
5.4.30.0070.06016.36
5.4.20.0030.04716.30
5.4.10.0100.06716.45
5.4.00.0000.07015.84
5.3.290.0100.05714.60
5.3.280.0030.07714.63
5.3.270.0030.08014.64
5.3.260.0030.08014.67
5.3.250.0070.07314.67
5.3.240.0070.07014.63
5.3.230.0000.06714.57
5.3.220.0000.05714.66
5.3.210.0000.06714.55
5.3.200.0000.05014.45
5.3.190.0030.08014.56
5.3.180.0030.07014.52
5.3.170.0030.07314.58
5.3.160.0030.05714.51
5.3.150.0030.07714.71
5.3.140.0030.04714.63
5.3.130.0070.06314.53
5.3.120.0000.05714.54
5.3.110.0130.05314.47
5.3.100.0030.06014.18
5.3.90.0030.07713.98
5.3.80.0030.05713.95
5.3.70.0070.03713.90
5.3.60.0030.07013.90
5.3.50.0030.07313.88
5.3.40.0070.03713.85
5.3.30.0030.07313.98
5.3.20.0030.06313.78
5.3.10.0000.07313.67
5.3.00.0000.05313.54
5.2.170.0030.06011.01
5.2.160.0030.04011.16
5.2.150.0070.06711.21
5.2.140.0030.04711.17
5.2.130.0030.04011.23
5.2.120.0000.04711.12
5.2.110.0030.06311.12
5.2.100.0000.06311.12
5.2.90.0030.04311.11
5.2.80.0030.03711.21
5.2.70.0000.06711.20
5.2.60.0100.05311.21
5.2.50.0030.06311.13
5.2.40.0100.05011.05
5.2.30.0000.06710.99
5.2.20.0000.06710.87
5.2.10.0000.06010.80
5.2.00.0070.05710.64
5.1.60.0000.05310.63
5.1.50.0030.05010.63
5.1.40.0030.05010.63
5.1.30.0070.05310.63
5.1.20.0030.05710.63
5.1.10.0030.05710.63
5.1.00.0030.05710.63
5.0.50.0030.04010.63
5.0.40.0030.04010.63
5.0.30.0030.06310.63
5.0.20.0030.04010.63
5.0.10.0000.04710.63
5.0.00.0000.05310.63
4.4.90.0070.03310.63
4.4.80.0030.03010.63
4.4.70.0030.02710.63
4.4.60.0000.03710.63
4.4.50.0030.03310.63
4.4.40.0100.04710.63
4.4.30.0030.03010.63
4.4.20.0030.03010.63
4.4.10.0000.03710.63
4.4.00.0070.04010.63
4.3.110.0030.02710.63
4.3.100.0000.03310.63
4.3.90.0000.03310.63
4.3.80.0030.04010.63
4.3.70.0000.03710.63
4.3.60.0000.03310.63
4.3.50.0030.03710.63
4.3.40.0000.05010.63
4.3.30.0070.02710.63
4.3.20.0030.03310.63
4.3.10.0030.03010.63
4.3.00.0030.03010.63

preferences:
39.42 ms | 401 KiB | 5 Q