3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XML { public function __CONSTRUCT($array) { foreach($array as $key => $val) { if(isset($key) && $key) { $this->$key = (object) null; $obj = $this->$val; $this->$val = $obj->bindTo($this->$key, $this->$val); } else { $this->$val = (object) null; $obj = $this->$val; $this->$val = $obj->bindTo($this->$val, $this->$val); } } } } $array = ["database"=>["host"=>"localhost","dbname"=>"mydb","user"=>"root","password"=>""]]; $xml = new XML($array); echo($xml->{"database"}->{"host"});

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.0150.00316.75
8.3.50.0090.00921.92
8.3.40.0090.01218.93
8.3.30.0070.00718.67
8.3.20.0050.00320.20
8.3.10.0060.00923.59
8.3.00.0000.00819.50
8.2.180.0040.01218.28
8.2.170.0070.00722.96
8.2.160.0100.01020.53
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00317.75
8.2.110.0000.00919.31
8.2.100.0040.00817.93
8.2.90.0090.00019.22
8.2.80.0040.00417.97
8.2.70.0000.00817.59
8.2.60.0090.00018.05
8.2.50.0000.00818.07
8.2.40.0040.00419.34
8.2.30.0040.00420.58
8.2.20.0050.00317.83
8.2.10.0070.00018.06
8.2.00.0000.00718.02
8.1.280.0060.00925.92
8.1.270.0080.00023.63
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.59
8.1.230.0040.00817.65
8.1.220.0040.00417.74
8.1.210.0100.00318.77
8.1.200.0030.00617.38
8.1.190.0040.00417.38
8.1.180.0000.00718.10
8.1.170.0000.00818.50
8.1.160.0000.00722.08
8.1.150.0000.00718.93
8.1.140.0040.00419.57
8.1.130.0030.00317.73
8.1.120.0040.00417.39
8.1.110.0070.00017.39
8.1.100.0030.00517.51
8.1.90.0040.00417.46
8.1.80.0000.00717.41
8.1.70.0000.00717.47
8.1.60.0040.00417.67
8.1.50.0000.00917.59
8.1.40.0040.00417.60
8.1.30.0040.00417.57
8.1.20.0000.01117.59
8.1.10.0040.00417.62
8.1.00.0070.00317.43
8.0.300.0040.00418.77
8.0.290.0080.00016.88
8.0.280.0040.00418.45
8.0.270.0000.00717.34
8.0.260.0030.00317.28
8.0.250.0000.00716.90
8.0.240.0000.00616.94
8.0.230.0070.00017.00
8.0.220.0000.00717.01
8.0.210.0040.00416.96
8.0.200.0030.00316.98
8.0.190.0050.00316.93
8.0.180.0070.00017.02
8.0.170.0040.00416.89
8.0.160.0000.00816.99
8.0.150.0070.00016.93
8.0.140.0000.00717.00
8.0.130.0000.00513.42
8.0.120.0060.00316.83
8.0.110.0000.00716.96
8.0.100.0040.00416.93
8.0.90.0040.00417.05
8.0.80.0040.01117.00
8.0.70.0040.00416.89
8.0.60.0000.00816.78
8.0.50.0000.00716.87
8.0.30.0100.00817.05
8.0.20.0140.00817.40
8.0.10.0000.00717.10
8.0.00.0070.00916.86
7.4.330.0000.00515.08
7.4.320.0030.00316.68
7.4.300.0000.00616.63
7.4.290.0030.00316.64
7.4.280.0040.00416.65
7.4.270.0000.00716.50
7.4.260.0000.00716.47
7.4.250.0000.00716.49
7.4.240.0040.00416.66
7.4.230.0000.00716.43
7.4.220.0070.01016.65
7.4.210.0110.00316.64
7.4.200.0030.00316.73
7.4.160.0120.00316.32
7.4.150.0180.00017.40
7.4.140.0100.01117.86
7.4.130.0050.01316.56
7.4.120.0110.00716.51
7.4.110.0070.01816.67
7.4.100.0070.01416.62
7.4.90.0110.00616.63
7.4.80.0120.00919.39
7.4.70.0120.01016.45
7.4.60.0100.00716.63
7.4.50.0090.00016.39
7.4.40.0120.00816.50
7.4.30.0200.01616.58
7.4.00.0040.01114.86
7.3.330.0030.00313.45
7.3.320.0050.00013.17
7.3.310.0030.00516.39
7.3.300.0070.00016.40
7.3.290.0080.00716.39
7.3.280.0090.01016.40
7.3.270.0120.00617.40
7.3.260.0150.00916.45
7.3.250.0110.00816.43
7.3.240.0130.00916.43
7.3.230.0120.00416.61
7.3.210.0100.01216.35
7.3.200.0140.00716.71
7.3.190.0130.00316.51
7.3.180.0060.01116.62
7.3.170.0120.01216.37
7.3.160.0120.00316.56
7.2.330.0070.01016.85
7.2.320.0030.01616.52
7.2.310.0090.00916.59
7.2.300.0180.02116.92
7.2.290.0140.00316.72
7.2.60.0060.01016.77
7.2.00.0120.00419.50
7.1.200.0090.00315.68
7.1.100.0110.00617.83
7.1.70.0060.00316.92
7.1.60.0070.01819.43
7.1.50.0060.01517.04
7.1.00.0030.07722.37
7.0.200.0210.00714.74
7.0.60.0000.04319.87
7.0.50.0070.07017.96
7.0.40.0030.09020.12
7.0.30.0300.08020.22
7.0.20.0370.07320.09
7.0.10.0170.08020.09
7.0.00.0070.09020.27
5.6.280.0070.06321.13
5.6.210.0130.07320.46
5.6.200.0130.06718.21
5.6.190.0070.08720.35
5.6.180.0330.07020.60
5.6.170.0300.03720.47
5.6.160.0070.04320.56
5.6.150.0130.07318.23
5.6.140.0030.03718.25
5.6.130.0030.04018.11
5.6.120.0130.04320.99
5.6.110.0200.07020.89
5.6.100.0070.05021.13
5.6.90.0070.08721.06
5.6.80.0100.07320.51
5.5.350.0300.06720.34
5.5.340.0000.05017.96
5.5.330.0100.06020.37
5.5.320.0200.04020.35
5.5.310.0230.05320.37
5.5.300.0130.07317.98
5.5.290.0130.06717.95
5.5.280.0070.05720.88
5.5.270.0000.04320.77
5.5.260.0030.06020.80
5.5.250.0070.04320.79
5.5.240.0100.07020.14
5.4.450.0100.05319.13
5.4.440.0030.06319.38
5.4.430.0470.04719.38
5.4.420.0600.05319.59
5.4.410.0530.05319.26
5.4.400.0670.04719.06
5.4.390.0570.05719.06
5.4.380.0530.05319.21
5.4.370.0470.05319.02
5.4.360.0470.05719.06
5.4.350.0500.05719.22
5.4.340.0700.04718.97
5.4.320.0630.04719.18
5.4.310.0530.05318.97
5.4.300.0530.05318.93
5.4.290.0600.04719.01
5.4.280.0530.05719.08
5.4.270.0530.06319.19
5.4.260.0570.05019.19
5.4.250.0470.06018.96
5.4.240.0630.04719.18
5.4.230.0500.05719.19
5.4.220.0500.05318.96
5.4.210.0500.05318.83
5.4.200.0500.05718.96
5.4.190.0600.04318.81
5.4.180.0070.05319.16
5.4.170.0100.05319.16
5.4.160.0170.05319.04
5.4.150.0500.05318.97
5.4.140.0500.04716.37
5.4.130.0430.05316.47
5.4.120.0400.05716.68
5.4.110.0600.05016.57
5.4.100.0730.04316.18
5.4.90.0700.05016.54
5.4.80.0630.04716.46
5.4.70.0600.06716.46
5.4.60.0430.05716.45
5.4.50.0630.04016.57
5.4.40.0530.05016.36
5.4.30.0700.05716.54
5.4.20.0630.06716.44
5.4.10.0730.06316.21
5.4.00.0500.05315.83

preferences:
56.7 ms | 401 KiB | 5 Q