3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $holder; private $children; public function __construct($content = '', array $children = []) { $this->holder = $content; $this->setChildren($children); } public function setChildren(array $children) { $this->children = $children; foreach ($children as $child) { $child->setParent($this); } } } class Bar { private $holder; private $parent; public function __construct($content = '', Foo $parent = null) { $this->holder = $content; $this->setParent($parent); } public function setParent(Foo $parent = null) { $this->parent = $parent; } } $child0 = new Bar('child#0'); $child1 = new Bar('child#1'); //same $child2 = new Bar('child#0'); $child3 = new Bar('child#1'); $parent0 = new Foo('parent', [$child0, $child1]); $parent1 = new Foo('parent', [$child2, $child3]); //Fatal: var_dump(get_object_vars($parent0) == get_object_vars($parent1));

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.70.0080.00816.75
8.3.60.0150.00618.56
8.3.50.0130.00921.11
8.3.40.0160.00318.97
8.3.30.0120.00619.02
8.3.20.0030.00620.21
8.3.10.0040.00421.90
8.3.00.0080.00017.75
8.2.190.0170.00016.58
8.2.180.0120.00325.92
8.2.170.0100.00322.96
8.2.160.0140.00020.35
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00720.71
8.2.110.0070.00321.04
8.2.100.0040.00717.75
8.2.90.0000.00819.34
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0030.00517.80
8.2.50.0040.00418.07
8.2.40.0000.00819.66
8.2.30.0050.00318.03
8.2.20.0070.00317.77
8.2.10.0070.00018.00
8.2.00.0000.00718.11
8.1.280.0000.01625.92
8.1.270.0060.01321.77
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0050.00522.02
8.1.230.0060.00617.65
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00917.25
8.1.190.0030.00517.13
8.1.180.0030.00718.10
8.1.170.0100.00318.28
8.1.160.0080.00022.15
8.1.150.0000.00818.79
8.1.140.0040.00417.49
8.1.130.0080.00017.87
8.1.120.0060.00317.55
8.1.110.0040.00417.48
8.1.100.0070.00017.46
8.1.90.0100.00017.50
8.1.80.0040.00317.48
8.1.70.0000.00717.45
8.1.60.0040.00417.52
8.1.50.0080.00017.49
8.1.40.0040.00417.57
8.1.30.0060.00317.62
8.1.20.0040.00417.58
8.1.10.0040.00417.51
8.1.00.0070.00017.53
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0070.00018.46
8.0.270.0000.00717.21
8.0.260.0000.00817.18
8.0.250.0040.00417.02
8.0.240.0000.00816.85
8.0.230.0000.00717.01
8.0.220.0030.00416.84
8.0.210.0000.00716.87
8.0.200.0030.00316.98
8.0.190.0040.00416.84
8.0.180.0020.00516.85
8.0.170.0080.00016.89
8.0.160.0030.00516.90
8.0.150.0000.00716.88
8.0.140.0000.00716.78
8.0.130.0000.00513.34
8.0.120.0000.00816.81
8.0.110.0000.00717.00
8.0.100.0040.00416.73
8.0.90.0040.00316.80
8.0.80.0180.00416.84
8.0.70.0000.00717.00
8.0.60.0040.00417.00
8.0.50.0050.00216.89
8.0.30.0130.00717.21
8.0.20.0070.01217.40
8.0.10.0040.00416.92
8.0.00.0120.00716.96
7.4.330.0000.00615.08
7.4.320.0030.00316.49
7.4.300.0000.00616.54
7.4.290.0030.00316.50
7.4.280.0030.00616.54
7.4.270.0030.00616.57
7.4.260.0050.00216.52
7.4.250.0000.00716.54
7.4.240.0000.00716.60
7.4.230.0000.00716.40
7.4.220.0160.01016.51
7.4.210.0080.00716.54
7.4.200.0070.00016.65
7.4.160.0160.00016.36
7.4.150.0150.00317.40
7.4.140.0120.00717.86
7.4.130.0120.01016.54
7.4.120.0090.00916.53
7.4.110.0030.01416.77
7.4.100.0130.01016.54
7.4.90.0000.01616.55
7.4.80.0150.00819.39
7.4.70.0150.00916.50
7.4.60.0130.00716.71
7.4.50.0000.00816.27
7.4.40.0130.00316.60
7.4.30.0100.00616.68
7.4.00.0080.00915.02
7.3.330.0000.00513.35
7.3.320.0000.01513.20
7.3.310.0070.00016.21
7.3.300.0030.00316.31
7.3.290.0000.00716.21
7.3.280.0070.01116.35
7.3.270.0150.00617.40
7.3.260.0120.00616.51
7.3.250.0110.00816.46
7.3.240.0060.00916.64
7.3.230.0170.00616.49
7.3.210.0070.01116.68
7.3.200.0070.01019.39
7.3.190.0100.00716.44
7.3.180.0120.00316.42
7.3.170.0100.01016.27
7.3.160.0120.00416.43
7.3.120.0030.01614.79
7.3.110.0030.00914.87
7.3.100.0120.00314.56
7.3.90.0140.00414.69
7.3.80.0080.00614.65
7.3.70.0070.01014.87
7.3.60.0050.00514.86
7.3.50.0030.00914.59
7.3.40.0030.01014.70
7.3.30.0110.00414.64
7.3.20.0040.01116.41
7.3.10.0060.00316.62
7.3.00.0000.00916.70
7.2.330.0120.00616.68
7.2.320.0030.01316.68
7.2.310.0090.00616.43
7.2.300.0130.00316.75
7.2.290.0110.01116.73
7.2.250.0070.01115.31
7.2.240.0040.01514.87
7.2.230.0100.00615.07
7.2.220.0130.00615.03
7.2.210.0110.00315.00
7.2.200.0000.00914.96
7.2.190.0060.00915.09
7.2.180.0040.00415.00
7.2.170.0080.00315.08
7.2.60.0070.01117.08
7.2.00.0070.00719.36
7.1.330.0000.01215.84
7.1.320.0120.00315.84
7.1.310.0100.00015.92
7.1.300.0070.00715.79
7.1.290.0000.00915.53
7.1.280.0030.01015.48
7.1.270.0040.00815.69
7.1.260.0040.00415.78
7.1.200.0000.00715.69
7.1.100.0100.00717.98
7.1.70.0000.00817.11
7.1.60.0130.01019.50
7.1.50.0070.01816.97
7.1.00.0100.07022.32
7.0.200.0000.00716.90
7.0.60.0130.07719.87
7.0.50.0030.04017.89
7.0.40.0030.04320.11
7.0.30.0500.07320.06
7.0.20.0270.04320.10
7.0.10.0000.05020.21
7.0.00.0030.09020.10
5.6.280.0030.06720.92
5.6.210.0070.08320.56
5.6.200.0030.05018.25
5.6.190.0070.08320.40
5.6.180.4070.04020.61
5.6.170.0270.04020.58
5.6.160.0030.08020.71
5.6.150.0030.08018.18
5.6.140.0070.04318.28
5.6.130.0100.07718.13
5.6.120.0070.05721.03
5.6.110.0030.08721.00
5.6.100.0100.08021.05
5.6.90.0000.04321.13
5.6.80.0130.05720.41
5.5.350.0130.05320.53
5.5.340.0130.04717.98
5.5.330.0100.07020.19
5.5.320.0300.04320.38
5.5.310.0270.04020.30
5.5.300.0070.08018.08
5.5.290.0070.04717.94
5.5.280.0130.07720.91
5.5.270.0000.06320.79
5.5.260.0000.04720.88
5.5.250.0030.04020.63
5.5.240.0030.03020.05
5.4.450.0130.06019.28
5.4.440.0000.04019.64
5.4.430.0100.03719.56
5.4.420.0100.05719.61
5.4.410.0130.05019.04
5.4.400.0130.05018.73
5.4.390.0070.05718.76
5.4.380.0200.05318.47
5.4.370.0130.08018.57
5.4.360.0170.04718.59
5.4.350.0100.06018.75
5.4.340.0130.07318.50
5.4.320.0130.06718.59
5.4.310.0000.06018.80
5.4.300.0170.05018.52
5.4.290.0070.06318.73
5.4.280.0230.04018.83
5.4.270.0130.05318.73
5.4.260.0170.05018.71
5.4.250.0100.06718.71
5.4.240.0130.07318.74
5.4.230.0100.06318.71
5.4.220.0070.06018.58
5.4.210.0130.07318.77
5.4.200.0170.06316.55
5.4.190.0170.05718.55
5.4.180.0200.07318.57
5.4.170.0170.07718.71
5.4.160.0130.05018.71
5.4.150.0170.05318.68
5.4.140.0130.05716.20
5.4.130.0100.06016.26
5.4.120.0130.07316.23
5.4.110.0130.04716.35
5.4.100.0100.05316.28
5.4.90.0130.05016.45
5.4.80.0170.05316.26
5.4.70.0170.06016.17
5.4.60.0230.05016.19
5.4.50.0070.07016.30
5.4.40.0070.06016.41
5.4.30.0030.06016.19
5.4.20.0100.06016.42
5.4.10.0230.05016.17
5.4.00.0200.05715.67
5.3.290.0130.05714.79
5.3.280.0170.05314.63
5.3.270.0230.04314.66
5.3.260.0030.06314.59
5.3.250.0100.05314.73
5.3.240.0070.06014.64
5.3.230.0130.05314.58
5.3.220.0100.06014.70
5.3.210.0030.06314.55
5.3.200.0100.05014.61
5.3.190.0030.06014.60
5.3.180.0100.05314.59
5.3.170.0230.03714.62
5.3.160.0100.05314.70
5.3.150.0200.06014.61
5.3.140.0130.06714.68
5.3.130.0130.05314.68
5.3.120.0100.05314.59
5.3.110.0230.06314.57
5.3.100.0100.07314.26
5.3.90.0100.06314.20
5.3.80.0130.06714.09
5.3.70.0230.05714.06
5.3.60.0070.07314.20
5.3.50.0070.06313.95
5.3.40.0130.06714.04
5.3.30.0170.04013.96
5.3.20.0100.05013.81
5.3.10.0100.04713.76
5.3.00.0070.06313.77
5.2.170.0130.03711.20
5.2.160.0030.06311.27
5.2.150.0030.04711.27
5.2.140.0100.05011.17
5.2.130.0100.04011.23
5.2.120.0100.04011.21
5.2.110.0070.04011.13
5.2.100.0000.04711.14
5.2.90.0030.04311.15
5.2.80.0130.05011.20
5.2.70.0100.05311.17
5.2.60.0130.03711.16
5.2.50.0030.04711.14
5.2.40.0030.04310.97
5.2.30.0070.04310.96
5.2.20.0130.03710.98
5.2.10.0130.03311.10
5.2.00.0100.03710.92
5.1.60.0070.03310.19
5.1.50.0070.03310.02
5.1.40.0100.03010.10
5.1.30.0070.03710.55
5.1.20.0000.04310.44
5.1.10.0070.03710.15
5.1.00.0070.03710.27
5.0.50.0030.0308.63
5.0.40.0070.0278.43
5.0.30.0030.0508.36
5.0.20.0170.0208.33
5.0.10.0070.0278.21
5.0.00.0130.0378.14
4.4.90.0030.0235.91
4.4.80.0070.0205.96
4.4.70.0100.0175.85
4.4.60.0030.0235.93
4.4.50.0070.0235.89
4.4.40.0170.0335.92
4.4.30.0030.0235.89
4.4.20.0070.0276.01
4.4.10.0100.0205.98
4.4.00.0030.0435.91
4.3.110.0070.0175.81
4.3.100.0070.0275.82
4.3.90.0100.0205.77
4.3.80.0030.0405.85
4.3.70.0000.0275.81
4.3.60.0070.0275.81
4.3.50.0100.0235.77
4.3.40.0070.0405.84
4.3.30.0000.0304.58
4.3.20.0030.0234.61
4.3.10.0000.0304.58
4.3.00.0000.01715.57

preferences:
30.38 ms | 401 KiB | 5 Q