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); bindTo($this->$key, $this->$val); } else { $this->$val = (object); 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)
5.6.150.0070.08018.20
5.6.140.0030.04018.24
5.6.130.0030.05318.24
5.6.120.0070.08321.14
5.6.110.0070.08020.97
5.6.100.0070.07020.89
5.6.90.0070.04721.08
5.6.80.0100.07720.38
5.5.300.0100.05317.98
5.5.290.0030.08317.95
5.5.280.0070.05720.66
5.5.270.0000.04320.84
5.5.260.0030.08720.73
5.5.250.0070.05720.66
5.5.240.0100.07320.26
5.4.450.0730.06019.33
5.4.440.0600.06019.17
5.4.430.0500.06019.25
5.4.420.0630.05019.37
5.4.410.0530.06019.16
5.4.400.0570.05319.08
5.4.390.0630.05019.11
5.4.380.0600.05019.05
5.4.370.0570.04719.11
5.4.360.0570.05319.11
5.4.350.0500.06019.04
5.4.340.0630.05318.89
5.4.320.0530.06018.89
5.4.310.0630.04719.04
5.4.300.0700.05719.03
5.4.290.0730.05719.04
5.4.280.0600.05719.04
5.4.270.0570.04018.96
5.4.260.0630.04318.88
5.4.250.0100.05319.03
5.4.240.0170.05319.02
5.4.230.0270.05019.02
5.4.220.0500.06318.99
5.4.210.0630.04318.91
5.4.200.0600.05719.05
5.4.190.0530.05318.96
5.4.180.0500.05719.03
5.4.170.0570.05018.91
5.4.160.0470.05719.05
5.4.150.0600.07019.09
5.4.140.0600.05716.42
5.4.130.0570.04316.36
5.4.120.0600.04316.45
5.4.110.0430.06016.56
5.4.100.0570.04316.55
5.4.90.0500.05316.56
5.4.80.0500.05016.55
5.4.70.0530.05016.57
5.4.60.0570.04716.44
5.4.50.0470.05316.21
5.4.40.0500.05016.14
5.4.30.0500.05016.34
5.4.20.0530.05316.23
5.4.10.0500.05316.14
5.4.00.0600.04315.78

preferences:
142.63 ms | 1394 KiB | 7 Q