3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XMLCreator { private $data = Array ( "zipcode" => "95610", "city" => "Citrus Heights", "icao" => "KMCC", "ccobst" => "McClellan Airfield", "obdist" => 7.3067011821565, "oblat" => 38.667, "oblong" => -121.4, ); function __construct() { $this->generate_xml_element(); } function __destruct() { } function generate_xml_element() { $doc = new DOMDocument(); // we want a nice output $doc->formatOutput = true; $root = $doc->createElement('address'); $root = $doc->appendChild($root); foreach ($this->data as $key => $value) { $title = $doc->createElement($key); $title = $root->appendChild($title); $text = $doc->createTextNode($value); $text = $title->appendChild($text); } echo "Saving all the document:\n"; echo $doc->saveXML() . "\n"; } } ?>

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.0180.00018.31
8.3.50.0130.00622.04
8.3.40.0150.00018.59
8.3.30.0030.01019.06
8.3.20.0040.00420.13
8.3.10.0060.00323.70
8.3.00.0080.00020.95
8.2.180.0130.00718.29
8.2.170.0000.01422.96
8.2.160.0130.00020.35
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00422.21
8.2.110.0030.00619.27
8.2.100.0060.00617.72
8.2.90.0080.00017.90
8.2.80.0040.00417.97
8.2.70.0030.00617.38
8.2.60.0040.00417.91
8.2.50.0030.00518.07
8.2.40.0100.00017.97
8.2.30.0040.00418.16
8.2.20.0070.00017.53
8.2.10.0030.00617.96
8.2.00.0000.00817.58
8.1.280.0120.00325.92
8.1.270.0060.00323.78
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0080.00421.97
8.1.230.0080.00322.75
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.10
8.1.190.0050.00317.10
8.1.180.0040.00418.76
8.1.170.0000.00818.64
8.1.160.0040.00421.92
8.1.150.0040.00418.55
8.1.140.0070.00017.29
8.1.130.0030.00317.78
8.1.120.0040.00417.41
8.1.110.0050.00217.24
8.1.100.0000.00817.25
8.1.90.0000.00717.43
8.1.80.0000.00817.30
8.1.70.0070.00017.28
8.1.60.0060.00317.39
8.1.50.0040.00417.36
8.1.40.0050.00217.40
8.1.30.0040.00417.60
8.1.20.0030.00617.46
8.1.10.0070.00017.45
8.1.00.0060.00317.34
8.0.300.0000.00719.71
8.0.290.0040.00416.58
8.0.280.0000.00718.42
8.0.270.0070.00017.21
8.0.260.0000.00717.16
8.0.250.0030.00316.87
8.0.240.0030.00716.80
8.0.230.0070.00016.82
8.0.220.0060.00316.84
8.0.210.0070.00016.79
8.0.200.0030.00616.81
8.0.190.0000.00816.85
8.0.180.0070.00016.70
8.0.170.0000.00816.84
8.0.160.0040.00416.70
8.0.150.0070.00016.66
8.0.140.0050.00316.74
8.0.130.0060.00013.20
8.0.120.0030.00516.74
8.0.110.0040.00416.80
8.0.100.0030.00516.86
8.0.90.0030.00516.80
8.0.80.0060.01616.83
8.0.70.0070.00016.83
8.0.60.0070.00016.86
8.0.50.0000.00816.79
8.0.30.0080.01116.98
8.0.20.0130.00517.40
8.0.10.0000.00716.80
8.0.00.0050.01316.53
7.4.330.0060.00015.00
7.4.320.0070.00016.51
7.4.300.0000.00616.43
7.4.290.0000.00716.30
7.4.280.0040.00416.40
7.4.270.0000.00716.43
7.4.260.0040.00416.37
7.4.250.0050.00316.47
7.4.240.0050.00216.46
7.4.230.0050.00316.42
7.4.220.0030.01416.50
7.4.210.0070.00616.43
7.4.200.0030.00316.52
7.4.190.0030.00316.58
7.4.160.0070.01016.24
7.4.150.0110.00617.40
7.4.140.0110.00917.86
7.4.130.0100.00816.45
7.4.120.0130.00516.47
7.4.110.0110.00616.27
7.4.100.0140.00716.39
7.4.90.0140.00316.35
7.4.80.0110.00719.39
7.4.70.0040.01216.27
7.4.60.0040.01416.27
7.4.50.0040.00416.30
7.4.40.0070.01016.35
7.4.30.0060.01016.38
7.4.10.0060.01314.93
7.4.00.0030.01614.74
7.3.330.0020.00213.07
7.3.320.0000.00513.23
7.3.310.0050.00316.23
7.3.300.0000.00716.25
7.3.290.0030.01116.27
7.3.280.0030.01516.17
7.3.270.0110.00617.40
7.3.260.0120.00916.40
7.3.250.0130.00716.35
7.3.240.0090.00616.46
7.3.230.0100.00716.39
7.3.210.0060.01216.31
7.3.200.0130.01019.39
7.3.190.0030.01616.36
7.3.180.0060.00916.25
7.3.170.0060.01016.27
7.3.160.0060.01016.46
7.3.130.0100.00714.49
7.3.120.0030.01414.73
7.3.110.0130.00314.59
7.3.100.0000.01614.96
7.3.90.0060.01014.67
7.3.80.0000.01214.57
7.3.70.0080.00614.63
7.3.60.0100.00614.70
7.3.50.0030.00714.50
7.3.40.0070.00714.66
7.3.30.0120.00014.70
7.3.20.0030.01316.65
7.3.10.0060.01216.27
7.3.00.0080.00416.63
7.2.330.0100.00716.47
7.2.320.0060.01216.54
7.2.310.0100.01316.31
7.2.300.0110.00516.45
7.2.290.0130.00316.32
7.2.260.0110.01114.75
7.2.250.0070.00414.75
7.2.240.0000.01514.93
7.2.230.0060.00914.98
7.2.220.0070.00715.06
7.2.210.0080.00414.76
7.2.200.0030.00714.81
7.2.190.0000.01514.70
7.2.180.0080.00414.58
7.2.170.0070.00714.77
7.2.160.0100.00314.96
7.2.150.0070.00716.91
7.2.140.0040.01116.59
7.2.130.0030.01416.54
7.2.120.0000.01516.63
7.2.110.0060.00916.53
7.2.100.0130.00316.59
7.2.90.0040.00816.68
7.2.80.0060.01016.76
7.2.70.0110.00716.71
7.2.60.0090.00516.69
7.2.50.0030.01216.69
7.2.40.0090.00616.56
7.2.30.0130.00316.39
7.2.20.0120.00016.50
7.2.10.0100.00616.72
7.2.00.0030.01316.84
7.1.330.0040.00715.52
7.1.320.0090.00615.32
7.1.310.0100.00315.35
7.1.300.0030.00715.73
7.1.290.0040.00715.50
7.1.280.0000.01415.33
7.1.270.0030.01015.41
7.1.260.0070.00415.54
7.1.250.0070.00715.51
7.1.240.0040.01115.38
7.1.230.0040.01215.71
7.1.220.0130.00015.53
7.1.210.0060.00815.64
7.1.200.0070.00915.40
7.1.190.0060.00615.56
7.1.180.0090.00315.49
7.1.170.0060.00615.50
7.1.160.0030.00615.69
7.1.150.0030.01015.75
7.1.140.0070.00315.46
7.1.130.0100.00015.39
7.1.120.0120.00615.55
7.1.110.0060.00615.54
7.1.100.0060.00615.75
7.1.90.0040.01115.46
7.1.80.0000.01115.68
7.1.70.0060.00616.26
7.1.60.0080.00517.36
7.1.50.0080.01216.05
7.1.40.0040.00715.36
7.1.30.0000.01415.56
7.1.20.0090.00615.53
7.1.10.0040.00715.50
7.1.00.0070.03918.95
7.0.330.0100.00315.20
7.0.320.0030.00715.38
7.0.310.0110.00315.17
7.0.300.0070.00715.14
7.0.290.0070.01015.05
7.0.280.0070.00715.14
7.0.270.0080.00815.03
7.0.260.0000.01515.16
7.0.250.0060.00315.04
7.0.240.0030.00915.29
7.0.230.0120.00015.40
7.0.220.0030.00615.24
7.0.210.0000.00815.27
7.0.200.0070.00615.81
7.0.190.0000.01015.29
7.0.180.0090.00315.14
7.0.170.0110.00315.27
7.0.160.0060.00915.44
7.0.150.0100.00315.27
7.0.140.0050.03918.54
7.0.130.0090.00615.37
7.0.120.0060.00915.21
7.0.110.0060.00615.40
7.0.100.0000.01415.33
7.0.90.0000.01215.26
7.0.80.0030.00715.25
7.0.70.0110.00615.31
7.0.60.0130.03617.61
7.0.50.0100.03316.63
7.0.40.0050.04616.76
7.0.30.0150.02916.82
7.0.20.0220.04016.66
7.0.10.0080.04516.73
7.0.00.0050.03316.78
5.6.400.0000.01113.96
5.6.390.0070.00713.95
5.6.380.0110.00414.00
5.6.370.0040.01414.45
5.6.360.0070.01014.37
5.6.350.0030.01414.39
5.6.340.0060.00614.38
5.6.330.0090.00914.24
5.6.320.0060.00613.96
5.6.310.0080.00614.42
5.6.300.0090.00614.29
5.6.290.0090.00014.11
5.6.280.0070.03817.48
5.6.270.0030.01014.24
5.6.260.0110.00414.00
5.6.250.0070.00314.01
5.6.240.0040.00414.18
5.6.230.0040.00714.05
5.6.220.0000.01914.27
5.6.210.0080.02517.21
5.6.200.0030.03016.19
5.6.190.0060.04517.37
5.6.180.0240.04617.29
5.6.170.0220.04017.29
5.6.160.0100.03317.27
5.6.150.0090.02816.16
5.6.140.0070.04215.97
5.6.130.0030.04316.19
5.6.120.0070.04517.54
5.6.110.0050.04117.58
5.6.100.0100.04017.54
5.6.90.0090.04617.71
5.6.80.0070.03917.30
5.6.70.0030.01014.14
5.6.60.0090.00613.86
5.6.50.0090.00614.03
5.6.40.0070.00714.02
5.6.30.0040.01214.11
5.6.20.0000.01213.94
5.6.10.0120.00314.01
5.6.00.0090.00313.94
5.5.380.0040.00414.10
5.5.370.0090.00313.93
5.5.360.0030.01314.23
5.5.350.0130.03417.30
5.5.340.0050.04416.02
5.5.330.0110.04017.16
5.5.320.0170.03517.18
5.5.310.0170.02917.10
5.5.300.0030.02516.04
5.5.290.0050.02515.89
5.5.280.0050.02817.33
5.5.270.0070.04817.38
5.5.260.0080.04517.40
5.5.250.0030.04217.39
5.5.240.0000.03917.24
5.5.230.0030.01313.58
5.5.220.0130.00313.82
5.5.210.0030.01413.71
5.5.200.0090.00313.74
5.5.190.0040.00713.87
5.5.180.0090.00314.12
5.5.170.0000.00814.00
5.5.160.0030.01014.09
5.5.150.0110.00313.83
5.5.140.0000.01614.15
5.5.130.0000.01013.99
5.5.120.0030.00913.64
5.5.110.0090.00613.82
5.5.100.0030.01414.04
5.5.90.0070.01014.16
5.5.80.0070.00713.94
5.5.70.0100.00613.77
5.5.60.0040.00714.11
5.5.50.0000.01713.82
5.5.40.0060.00913.79
5.5.30.0060.00913.84
5.5.20.0000.01213.85
5.5.10.0000.01014.29
5.5.00.0040.01114.00
5.4.450.0320.03315.75
5.4.440.0240.03215.69
5.4.430.0370.03015.59
5.4.420.0410.02515.76
5.4.410.0080.02815.64
5.4.400.0330.03315.42
5.4.390.0420.02515.54
5.4.380.0130.02815.37
5.4.370.0100.03015.22
5.4.360.0130.02815.35
5.4.350.0130.02515.26
5.4.340.0160.03015.35
5.4.330.0040.00711.94
5.4.320.0060.01912.22
5.4.310.0060.02712.22
5.4.300.0060.02112.22
5.4.290.0070.02812.22
5.4.280.0040.02812.17
5.4.270.0080.02012.17
5.4.260.0070.02112.17
5.4.250.0100.01912.17
5.4.240.0050.02712.17
5.4.230.0070.02112.16
5.4.220.0080.01912.17
5.4.210.0010.02712.16
5.4.200.0050.03112.16
5.4.190.0090.02112.16
5.4.180.0090.01912.16
5.4.170.0050.02112.17
5.4.160.0070.02012.17
5.4.150.0080.01912.16
5.4.140.0050.02812.01
5.4.130.0040.02612.00
5.4.120.0020.02411.98
5.4.110.0100.01911.98
5.4.100.0060.02311.98
5.4.90.0080.02011.98
5.4.80.0100.01911.98
5.4.70.0040.02411.97
5.4.60.0090.02011.97
5.4.50.0070.02111.97
5.4.40.0050.02211.97
5.4.30.0070.02011.97
5.4.20.0070.02811.97
5.4.10.0060.02111.97
5.4.00.0040.02411.71
5.3.290.0090.01912.37
5.3.280.0070.02712.32
5.3.270.0050.02512.33
5.3.260.0070.02412.33
5.3.250.0060.03112.33
5.3.240.0050.03112.33
5.3.230.0060.02912.32
5.3.220.0040.02412.31
5.3.210.0040.02412.31
5.3.200.0070.03412.31
5.3.190.0110.03012.31
5.3.180.0100.02612.30
5.3.170.0070.02212.30
5.3.160.0050.02212.31
5.3.150.0040.02312.30
5.3.140.0070.02012.30
5.3.130.0050.02312.30
5.3.120.0070.02212.30
5.3.110.0060.02612.29
5.3.100.0060.03212.03
5.3.90.0060.03112.02
5.3.80.0080.03012.02
5.3.70.0080.02112.02
5.3.60.0110.02412.01
5.3.50.0050.02711.98
5.3.40.0040.02811.98
5.3.30.0060.02111.96
5.3.20.0060.02211.85
5.3.10.0030.02411.84
5.3.00.0070.02411.83
5.2.170.0040.0349.22
5.2.160.0070.0359.22
5.2.150.0060.0449.22
5.2.140.0080.0399.22
5.2.130.0060.0419.19
5.2.120.0060.0379.18
5.2.110.0060.0439.19
5.2.100.0050.0419.18
5.2.90.0030.0339.18
5.2.80.0050.0349.18
5.2.70.0060.0329.18
5.2.60.0040.0359.13
5.2.50.0060.0349.10
5.2.40.0080.0299.08
5.2.30.0050.0439.06
5.2.20.0080.0389.04
5.2.10.0080.0388.95
5.2.00.0080.0498.81
5.1.60.0080.0378.09
5.1.50.0090.0348.09
5.1.40.0070.0418.07
5.1.30.0050.0288.43
5.1.20.0040.0298.44
5.1.10.0060.0288.16
5.1.00.0050.0258.16
5.0.50.0020.0236.65
5.0.40.0040.0216.51
5.0.30.0030.0326.32
5.0.20.0070.0186.31
5.0.10.0040.0226.30
5.0.00.0030.0366.29
4.4.90.0030.0184.78
4.4.80.0000.0194.75
4.4.70.0070.0194.75
4.4.60.0050.0164.75
4.4.50.0130.0214.77
4.4.40.0020.0284.71
4.4.30.0030.0164.76
4.4.20.0030.0174.84
4.4.10.0050.0184.84
4.4.00.0040.0254.76
4.3.110.0030.0164.67
4.3.100.0070.0134.67
4.3.90.0060.0244.63
4.3.80.0060.0304.58
4.3.70.0040.0204.63
4.3.60.0030.0214.63
4.3.50.0040.0214.63
4.3.40.0030.0244.54
4.3.30.0040.0153.30
4.3.20.0050.0143.28
4.3.10.0010.0193.24
4.3.00.0070.0237.32

preferences:
39.78 ms | 401 KiB | 5 Q