3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Tree { public $children = []; public $data; public function __construct($data, $children) { $this->data = $data; $this->children = $children; } } $children1 = new Tree(34, []); $children2 = new Tree(70, []); $rootNode = new Tree(12, [$children1, $children2]);

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.40.0060.01018.67
8.3.30.0040.01118.67
8.3.20.0060.00318.82
8.3.10.0000.00823.48
8.3.00.0050.00223.61
8.2.170.0110.00422.96
8.2.160.0030.01019.36
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0080.00021.11
8.2.120.0040.00426.35
8.2.110.0090.00022.21
8.2.100.0120.00317.59
8.2.90.0000.00820.26
8.2.80.0030.00518.05
8.2.70.0060.00217.93
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0020.00519.46
8.2.30.0080.00020.56
8.2.20.0050.00318.18
8.2.10.0000.00718.15
8.2.00.0000.00719.50
8.1.270.0070.00322.19
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00623.77
8.1.230.0040.00721.01
8.1.220.0060.00317.74
8.1.210.0040.00419.01
8.1.200.0040.00417.35
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0030.00618.67
8.1.160.0070.00018.90
8.1.150.0040.00418.80
8.1.140.0000.00820.66
8.1.130.0030.00320.20
8.1.120.0000.00717.43
8.1.110.0070.00017.32
8.1.100.0040.00417.48
8.1.90.0000.00817.47
8.1.80.0090.00017.49
8.1.70.0000.00717.35
8.1.60.0040.00417.59
8.1.50.0040.00417.38
8.1.40.0020.00517.44
8.1.30.0090.00317.69
8.1.20.0000.00717.58
8.1.10.0040.00417.64
8.1.00.0000.00817.46
8.0.300.0030.00319.98
8.0.290.0030.00616.75
8.0.280.0000.00718.44
8.0.270.0050.00217.19
8.0.260.0030.00320.14
8.0.250.0030.00516.95
8.0.240.0050.00316.84
8.0.230.0040.00416.96
8.0.220.0000.00716.79
8.0.210.0070.00016.88
8.0.200.0030.00316.96
8.0.190.0040.00416.88
8.0.180.0030.00516.82
8.0.170.0040.00416.79
8.0.160.0040.00416.94
8.0.150.0000.00716.76
8.0.140.0000.00816.75
8.0.130.0060.00013.29
8.0.120.0040.00416.90
8.0.110.0050.00316.77
8.0.100.0020.00716.77
8.0.90.0040.00416.86
8.0.80.0060.00816.82
8.0.70.0050.00416.87
8.0.60.0040.00416.86
8.0.50.0010.00716.93
8.0.30.0090.00816.99
8.0.20.0070.00717.16
8.0.10.0030.00516.94
8.0.00.0040.01016.87
7.4.330.0000.00715.55
7.4.320.0000.00616.47
7.4.300.0000.00716.61
7.4.290.0030.00316.61
7.4.280.0040.00416.40
7.4.270.0030.00316.65
7.4.260.0000.00816.48
7.4.250.0100.00016.51
7.4.240.0060.00216.55
7.4.230.0060.00116.56
7.4.220.0040.00416.56
7.4.210.0030.00816.50
7.4.200.0040.00416.59
7.4.190.0040.00416.58
7.4.180.0000.00716.66
7.4.160.0060.00816.53
7.4.150.0030.00516.55
7.4.140.0100.00717.64
7.4.130.0050.00816.56
7.4.120.0110.00716.52
7.4.110.0060.00616.49
7.4.100.0020.01116.54
7.4.90.0070.00716.46
7.4.80.0080.00717.94
7.4.70.0060.00916.50
7.4.60.0100.00516.57
7.4.50.0040.00616.37
7.4.40.0090.00816.47
7.4.30.0060.00316.39
7.4.20.0040.00416.46
7.4.10.0050.00316.49
7.4.00.0050.00715.77
7.3.330.0050.00013.20
7.3.320.0050.00013.24
7.3.310.0010.00616.26
7.3.300.0030.00516.22
7.3.290.0050.00316.17
7.3.280.0060.00816.22
7.3.270.0000.00816.13
7.3.260.0070.01016.31
7.3.250.0060.00316.18
7.3.240.0090.00916.15
7.3.230.0050.00716.21
7.3.220.0040.00416.16
7.3.210.0080.00416.27
7.3.200.0030.00916.20
7.3.190.0040.00816.16
7.3.180.0020.01116.27
7.3.170.0070.00516.23
7.3.160.0050.00716.15
7.3.150.0040.00316.00
7.3.140.0030.00516.18
7.3.130.0000.00716.21
7.3.120.0000.00716.24
7.3.110.0040.00416.19
7.3.100.0050.00316.17
7.3.90.0030.00516.40
7.3.80.0000.00716.18
7.3.70.0040.00416.30
7.3.60.0080.00715.56
7.3.50.0060.00915.51
7.3.40.0070.00815.48
7.3.30.0050.00915.46
7.3.20.0090.00216.42
7.3.10.0060.00916.40
7.3.00.0080.00716.33
7.2.340.0050.00916.35
7.2.330.0100.00816.30
7.2.320.0070.00916.45
7.2.310.0040.00916.55
7.2.300.0070.00916.34
7.2.290.0070.00716.38
7.2.280.0030.00716.30
7.2.270.0060.00616.42
7.2.260.0030.00616.18
7.2.250.0060.00316.40
7.2.240.0000.01116.34
7.2.230.0060.00616.28
7.2.220.0070.00716.29
7.2.210.0100.00316.27
7.2.200.0100.00216.28
7.2.190.0040.01015.66
7.2.180.0070.00815.61
7.2.170.0040.00915.55
7.2.160.0070.00515.56
7.2.150.0050.00816.45
7.2.140.0090.00416.56
7.2.130.0130.00516.59
7.2.120.0050.00916.71
7.2.110.0080.01016.61
7.2.100.0040.00716.71
7.2.90.0860.00716.15
7.2.80.0720.00916.19
7.2.70.0530.00516.26
7.2.60.0880.00916.20
7.2.50.0520.00516.32
7.2.40.0610.00616.30
7.2.30.0640.00616.09
7.2.20.0590.00616.22
7.2.10.0710.00516.33
7.2.00.0450.00716.23
7.1.330.0080.00815.48
7.1.320.0070.00315.50
7.1.310.0160.00415.39
7.1.300.0090.00815.44
7.1.290.0060.01015.53
7.1.280.0080.00315.60
7.1.270.0070.00715.42
7.1.260.0030.01115.49
7.1.250.0070.00615.37
7.1.240.0070.00615.47
7.1.230.0090.00615.42
7.1.220.0090.00715.43
7.1.210.1250.00614.89
7.1.200.0810.00514.99
7.1.190.0520.01114.92
7.1.180.0530.00715.03
7.1.170.0720.01115.08
7.1.160.0560.00514.93
7.1.150.0670.01114.90
7.1.140.0640.00615.01
7.1.130.0540.00715.10
7.1.120.0810.00515.05
7.1.110.0730.00514.99
7.1.100.0550.00414.99
7.1.90.1330.00714.95
7.1.80.0710.00615.03
7.1.70.0520.00614.99
7.1.60.0590.01019.43
7.1.50.1070.00619.36
7.1.40.1390.00819.55
7.1.30.1280.00819.56
7.1.20.1270.00219.30
7.1.10.1030.01014.90
7.1.00.0490.00415.01
7.0.330.0050.00515.26
7.0.320.0100.00615.24
7.0.310.0910.00714.43
7.0.300.0620.00614.73
7.0.290.0110.00715.23
7.0.280.0660.00414.64
7.0.270.0100.00615.25
7.0.260.0140.00415.24
7.0.250.0100.00415.27
7.0.240.0090.01015.31
7.0.230.0100.00315.31
7.0.220.0080.00915.22
7.0.210.0150.00615.28
7.0.200.0120.00415.19
7.0.190.0100.01015.36
7.0.180.0100.00715.26
7.0.170.0130.00515.22
7.0.160.0110.00614.97
7.0.150.0110.00615.06
7.0.140.0160.00115.19
7.0.130.0140.00515.27
7.0.120.0100.00915.43
7.0.110.0110.00715.09
7.0.100.0070.00615.24
7.0.90.0110.00615.33
7.0.80.0200.00715.27
7.0.70.0110.00415.27
7.0.60.0080.00815.01
7.0.50.0070.00415.21
7.0.40.0090.00715.37
7.0.30.0120.01015.50
7.0.20.0090.00515.26
7.0.10.0100.00815.28
7.0.00.0130.01015.34
5.6.400.0040.00814.96
5.6.390.0060.00714.82
5.6.380.0070.00714.79
5.6.370.0140.00815.15
5.6.360.0080.01014.96
5.6.350.0120.00815.15
5.6.340.0130.00315.21
5.6.330.0140.00615.24
5.6.320.0160.00215.11
5.6.310.0160.00315.08
5.6.300.0120.01014.71
5.6.290.0130.00715.00
5.6.280.0120.00815.21
5.6.270.0110.01115.02
5.6.260.0170.00715.22
5.6.250.0110.00715.01
5.6.240.0140.00315.13
5.6.230.0090.01115.15
5.6.220.0070.00715.10
5.6.210.0130.00415.17
5.6.200.0070.00614.98
5.6.190.0080.01115.28
5.6.180.0090.00715.27
5.6.170.0090.00815.25
5.6.160.0120.00915.15
5.6.150.0050.01015.17
5.6.140.0130.00715.03
5.6.130.0080.01115.11
5.6.120.0100.01014.98
5.6.110.0080.01015.05
5.6.100.0080.00614.96
5.6.90.0060.01315.07
5.6.80.0070.00915.11
5.6.70.0140.00615.09
5.6.60.0110.00915.12
5.6.50.0100.00714.93
5.6.40.0130.00515.03
5.6.30.0090.00815.06
5.6.20.0120.01215.01
5.6.10.0110.00815.07
5.6.00.0130.00715.07

preferences:
55.83 ms | 400 KiB | 5 Q