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; bindTo($this->$key, $this->$val); } else { $this->$val; 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.0120.00318.57
8.3.50.0100.00718.30
8.3.40.0070.00718.55
8.3.30.0100.00318.89
8.3.20.0040.00420.21
8.3.10.0050.00323.61
8.3.00.0060.00319.25
8.2.180.0090.00618.66
8.2.170.0110.00322.96
8.2.160.0140.00720.31
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0050.00226.16
8.2.120.0040.00417.61
8.2.110.0070.00320.35
8.2.100.0060.00617.93
8.2.90.0090.00019.21
8.2.80.0030.00617.97
8.2.70.0090.00017.75
8.2.60.0070.00717.80
8.2.50.0030.00618.07
8.2.40.0000.00919.33
8.2.30.0000.00720.64
8.2.20.0030.00517.69
8.2.10.0050.00318.13
8.2.00.0000.00718.00
8.1.280.0070.00725.92
8.1.270.0080.00023.97
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.54
8.1.230.0060.00617.66
8.1.220.0000.00717.74
8.1.210.0030.00518.77
8.1.200.0030.00617.47
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0000.00818.52
8.1.160.0040.00422.13
8.1.150.0030.00618.89
8.1.140.0080.00019.50
8.1.130.0050.00317.71
8.1.120.0040.00417.49
8.1.110.0040.00417.36
8.1.100.0050.00217.50
8.1.90.0030.00617.46
8.1.80.0000.00817.42
8.1.70.0000.00717.33
8.1.60.0030.00517.51
8.1.50.0000.00817.54
8.1.40.0040.00417.50
8.1.30.0040.00417.70
8.1.20.0070.00017.61
8.1.10.0040.00417.54
8.1.00.0000.00917.37
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.35
8.0.270.0040.00417.30
8.0.260.0060.00017.23
8.0.250.0000.00717.04
8.0.240.0030.00316.93
8.0.230.0030.00317.01
8.0.220.0040.00417.04
8.0.210.0000.00716.98
8.0.200.0030.00317.08
8.0.190.0000.00817.04
8.0.180.0050.00217.00
8.0.170.0000.00717.04
8.0.160.0020.00516.93
8.0.150.0030.00316.77
8.0.140.0070.00016.82
8.0.130.0050.00013.35
8.0.120.0040.00416.90
8.0.110.0040.00416.95
8.0.100.0080.00017.02
8.0.90.0070.00016.94
8.0.80.0100.01016.91
8.0.70.0080.00016.73
8.0.60.0070.00016.82
8.0.50.0000.00717.01
8.0.30.0080.00917.10
8.0.20.0120.00717.40
8.0.10.0080.00016.93
8.0.00.0100.00816.90
7.4.330.0050.00015.11
7.4.320.0000.00716.61
7.4.300.0030.00316.42
7.4.290.0000.00716.61
7.4.280.0050.00316.60
7.4.270.0000.00816.60
7.4.260.0100.00016.51
7.4.250.0000.00716.45
7.4.240.0040.00316.49
7.4.230.0000.00716.50
7.4.220.0170.00016.52
7.4.210.0070.01416.41
7.4.200.0000.00716.55
7.4.160.0120.00316.58
7.4.150.0120.01217.40
7.4.140.0110.01017.86
7.4.130.0100.00616.51
7.4.120.0100.00916.60
7.4.110.0100.01116.52
7.4.100.0070.01016.62
7.4.90.0090.00916.61
7.4.80.0140.00419.39
7.4.70.0070.01016.44
7.4.60.0100.00716.58
7.4.50.0000.00816.63
7.4.40.0150.00416.45
7.4.30.0090.01316.45
7.4.00.0090.00814.80
7.3.330.0030.00313.43
7.3.320.0030.00313.29
7.3.310.0050.00216.45
7.3.300.0070.00016.46
7.3.290.0070.00916.44
7.3.280.0120.00616.46
7.3.270.0070.01117.40
7.3.260.0140.00416.52
7.3.250.0100.00716.48
7.3.240.0150.00416.53
7.3.230.0060.01216.39
7.3.210.0100.00716.58
7.3.200.0150.00616.39
7.3.190.0120.00416.27
7.3.180.0070.01016.45
7.3.170.0100.00616.38
7.3.160.0040.01116.38
7.3.120.0120.00614.94
7.3.110.0030.01014.66
7.3.100.0060.00614.96
7.3.90.0030.01314.91
7.3.80.0000.01114.90
7.3.70.0030.00714.77
7.3.60.0090.00614.99
7.3.50.0080.00814.82
7.3.40.0040.01114.51
7.3.30.0070.01014.85
7.3.20.0090.00616.73
7.3.10.0060.00816.62
7.3.00.0090.00316.82
7.2.330.0090.00916.68
7.2.320.0060.01316.72
7.2.310.0000.01716.76
7.2.300.0120.01316.81
7.2.290.0060.01216.79
7.2.250.0070.01115.10
7.2.240.0100.01014.87
7.2.230.0120.00614.89
7.2.220.0110.00714.88
7.2.210.0040.00814.75
7.2.200.0090.00615.28
7.2.190.0030.00714.89
7.2.180.0060.00915.03
7.2.170.0130.00315.05
7.2.130.0120.00317.00
7.2.120.0070.01416.96
7.2.110.0070.00716.95
7.2.100.0060.00816.93
7.2.90.0090.00617.04
7.2.80.0110.00716.79
7.2.70.0030.00917.00
7.2.60.0050.00916.77
7.2.50.0070.00717.16
7.2.40.0030.01016.87
7.2.30.0040.01016.94
7.2.20.0070.00716.80
7.2.10.0000.01017.20
7.2.00.0030.01118.11
7.1.330.0060.00615.99
7.1.320.0090.00915.79
7.1.310.0060.00815.82
7.1.300.0030.01015.84
7.1.290.0090.00615.84
7.1.280.0000.01015.84
7.1.270.0040.01115.60
7.1.260.0100.00715.89
7.1.250.0000.01016.00
7.1.200.0000.01215.73
7.1.100.0160.00018.09
7.1.70.0040.00417.18
7.1.60.0100.01319.43
7.1.50.0050.00516.69
7.1.00.0000.08022.40
7.0.200.0240.00614.64
7.0.60.0070.04020.03
7.0.50.0100.07317.96
7.0.40.0070.05020.11
7.0.30.0370.07320.16
7.0.20.0300.04720.33
7.0.10.0100.08720.20
7.0.00.0130.05020.16
5.6.280.0070.06720.93
5.6.210.0030.06720.55
5.6.200.0100.08018.29
5.6.190.0030.04720.77
5.6.180.0330.07320.50
5.6.170.0200.03720.45
5.6.160.0130.07720.46
5.6.150.0070.08018.18
5.6.140.0030.04018.28
5.6.130.0070.08318.14
5.6.120.0030.09021.12
5.6.110.0100.07321.02
5.6.100.0130.06721.13
5.6.90.0130.06021.00
5.6.80.0130.06320.48
5.5.350.0270.03720.34
5.5.340.0030.05717.95
5.5.330.0100.05720.23
5.5.320.0200.08320.24
5.5.310.0270.05320.34
5.5.300.0000.06318.08
5.5.290.0030.08318.04
5.5.280.0130.07320.73
5.5.270.0000.04320.86
5.5.260.0070.05020.96
5.5.250.0070.04020.62
5.5.240.0130.06720.26
5.4.450.0670.04719.34
5.4.440.0600.06019.46
5.4.430.0630.05019.44
5.4.420.0700.06019.41
5.4.410.0570.06019.34
5.4.400.0600.05019.12
5.4.390.0570.05319.11
5.4.380.0500.05718.98
5.4.370.0230.06019.22
5.4.360.0130.05319.21
5.4.350.0100.05718.86
5.4.340.0300.07719.05
5.4.320.0770.06719.21
5.4.310.0670.06719.10
5.4.300.0630.05319.14
5.4.290.0570.06019.00
5.4.280.0730.06719.21
5.4.270.0700.07018.97
5.4.260.0300.06018.87
5.4.250.0170.07719.29
5.4.240.0200.07018.95
5.4.230.0200.06719.10
5.4.220.0130.05719.22
5.4.210.0170.05019.20
5.4.200.0130.05719.13
5.4.190.0130.05319.12
5.4.180.0100.05719.19
5.4.170.0170.05319.20
5.4.160.0130.05319.26
5.4.150.0100.06019.18
5.4.140.0300.06016.47
5.4.130.0230.07016.50
5.4.120.0270.06316.50
5.4.110.0230.06716.27
5.4.100.0270.06016.48
5.4.90.0130.07716.58
5.4.80.0200.06716.19
5.4.70.0200.06316.57
5.4.60.0230.06316.48
5.4.50.0200.06316.55
5.4.40.0170.07016.40
5.4.30.0230.06716.52
5.4.20.0300.06016.49
5.4.10.0230.07016.46
5.4.00.0130.05015.87

preferences:
46.56 ms | 400 KiB | 5 Q