3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = (object) [ 'children' => [] ]; $arr->children[] = 1; print_r($arr); class Test { public function test(){ $arr = (object) [ 'children' => [] ]; $arr->children[] = 1; return $arr; } } $o = new Test(); $o->test(); print_r( $o->test() );

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.0120.00318.84
8.3.30.0110.00418.70
8.3.20.0040.00420.20
8.3.10.0040.00421.92
8.3.00.0090.00619.71
8.2.170.0120.00922.96
8.2.160.0070.00720.41
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0090.00019.19
8.2.120.0080.00026.35
8.2.110.0080.00322.24
8.2.100.0040.00819.95
8.2.90.0040.00418.22
8.2.80.0030.00617.97
8.2.70.0000.00918.03
8.2.60.0060.00317.90
8.2.50.0000.00818.07
8.2.40.0040.00422.13
8.2.30.0050.00220.70
8.2.20.0000.00717.71
8.2.10.0030.00618.07
8.2.00.0030.00517.97
8.1.270.0050.00320.38
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0040.00422.02
8.1.230.0100.00322.69
8.1.220.0030.00617.74
8.1.210.0000.01018.77
8.1.200.0070.00317.35
8.1.190.0060.00317.23
8.1.180.0060.00318.10
8.1.170.0000.00818.56
8.1.160.0040.00420.62
8.1.150.0040.00418.75
8.1.140.0040.00419.53
8.1.130.0050.00217.41
8.1.120.0070.00017.45
8.1.110.0060.00317.46
8.1.100.0020.00517.41
8.1.90.0060.00317.41
8.1.80.0030.00617.29
8.1.70.0070.00017.40
8.1.60.0000.00917.59
8.1.50.0080.00017.46
8.1.40.0040.00417.41
8.1.30.0040.00417.66
8.1.20.0060.00317.71
8.1.10.0040.00417.41
8.1.00.0030.00617.45
8.0.300.0000.00719.64
8.0.290.0040.00416.75
8.0.280.0030.00318.43
8.0.270.0000.00717.21
8.0.260.0030.00316.75
8.0.250.0070.00016.93
8.0.240.0000.00816.94
8.0.230.0030.00316.92
8.0.220.0000.00816.93
8.0.210.0000.00716.80
8.0.200.0000.00716.88
8.0.190.0120.00016.95
8.0.180.0000.00716.96
8.0.170.0030.00516.95
8.0.160.0030.00316.93
8.0.150.0080.00016.83
8.0.140.0040.00416.89
8.0.130.0030.00313.32
8.0.120.0030.00516.91
8.0.110.0040.00416.93
8.0.100.0040.00416.70
8.0.90.0070.00016.91
8.0.80.0000.01516.92
8.0.70.0000.00716.77
8.0.60.0000.00816.86
8.0.50.0070.00016.89
8.0.30.0070.01017.02
8.0.20.0120.01017.40
8.0.10.0030.00616.84
8.0.00.0070.01416.83
7.4.330.0000.00516.79
7.4.320.0000.00616.45
7.4.300.0000.00616.50
7.4.290.0030.00316.53
7.4.280.0000.00716.58
7.4.270.0030.00316.53
7.4.260.0030.00316.52
7.4.250.0080.00016.56
7.4.240.0000.00716.51
7.4.230.0070.00016.72
7.4.220.0140.01116.46
7.4.210.0110.00416.71
7.4.200.0030.00316.67
7.4.160.0120.00316.54
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0080.00916.59
7.4.120.0110.00616.59
7.4.110.0070.01716.45
7.4.100.0070.01016.49
7.4.90.0120.00616.50
7.4.80.0100.00719.39
7.4.70.0060.01516.54
7.4.60.0070.01016.63
7.4.50.0110.00416.64
7.4.40.0130.00416.50
7.4.30.0170.00716.42
7.4.00.0020.01215.02
7.3.330.0000.00513.34
7.3.320.0000.00613.43
7.3.310.0000.00716.32
7.3.300.0040.00416.37
7.3.290.0050.01116.32
7.3.280.0080.00816.34
7.3.270.0030.01517.40
7.3.260.0140.00316.56
7.3.250.0100.00916.33
7.3.240.0070.01016.38
7.3.230.0110.00616.40
7.3.210.0070.01516.56
7.3.200.0030.01316.34
7.3.190.0140.01016.58
7.3.180.0100.00616.38
7.3.170.0090.00916.67
7.3.160.0090.00616.59
7.3.120.0110.00714.68
7.3.110.0060.00914.85
7.3.100.0060.00314.98
7.3.90.0080.00514.80
7.3.80.0070.00714.63
7.3.70.0000.01214.85
7.3.60.0090.00014.79
7.3.50.0030.01014.66
7.3.40.0030.01414.98
7.3.30.0070.01014.95
7.3.20.0070.00716.72
7.3.10.0000.01316.58
7.3.00.0030.00616.78
7.2.330.0120.00616.63
7.2.320.0030.01416.96
7.2.310.0040.01216.75
7.2.300.0070.01016.53
7.2.290.0060.01516.92
7.2.250.0040.01114.81
7.2.240.0030.01314.98
7.2.230.0140.00014.75
7.2.220.0160.00015.23
7.2.210.0070.01014.94
7.2.200.0100.00314.87
7.2.190.0030.01314.92
7.2.180.0030.01015.00
7.2.170.0070.00715.06
7.2.60.0090.00316.61
7.2.00.0030.00619.42
7.1.330.0090.00615.48
7.1.320.0100.00715.70
7.1.310.0000.01315.70
7.1.300.0030.01015.75
7.1.290.0040.00715.93
7.1.280.0090.00315.76
7.1.270.0080.00815.75
7.1.260.0040.00815.66
7.1.200.0070.00715.61
7.1.100.0550.00012.01
7.1.70.0110.00717.01
7.1.60.0120.00919.52
7.1.50.0070.01516.80
7.1.00.0030.07722.51
7.0.200.0230.00716.70
7.0.60.0130.08019.91
7.0.50.0000.04317.97
7.0.40.0100.05720.22
7.0.30.0170.07320.26
7.0.20.0300.04720.33
7.0.10.0030.04320.23
7.0.00.0200.07720.23
5.6.280.0000.03321.05
5.6.210.0030.04020.67
5.6.200.0070.07718.20
5.6.190.0200.03020.49
5.6.180.0300.07320.41
5.6.170.0300.06020.62
5.6.160.0000.04320.50
5.6.150.0100.07318.17
5.6.140.0100.07018.11
5.6.130.0000.05718.28
5.6.120.0130.03021.00
5.6.110.0030.08021.14
5.6.100.0070.08721.01
5.6.90.0030.06020.97
5.6.80.0070.04320.51
5.5.350.0300.07320.41
5.5.340.0170.06718.08
5.5.330.0100.08020.47
5.5.320.0500.05320.52
5.5.310.0200.04320.34
5.5.300.0100.06717.99
5.5.290.0030.04317.91
5.5.280.0030.04320.81
5.5.270.0130.07720.97
5.5.260.0070.08720.87
5.5.250.0130.07320.71
5.5.240.2330.03320.04

preferences:
44.11 ms | 400 KiB | 5 Q