3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_string = '<?xml version="1.0"?> <result> <code> <name>Warszawa</name> <lat>52.25</lat> <lng>21.0</lng> <otherDetails>some Warsaw info here</otherDetails> </code> <code> <name>Somewhere Else</name> <lat>42</lat> <lng>99</lng> <otherDetails>some info about somewhere else here</otherDetails> </code> </result> '; $xml = simplexml_load_string($xml_string); echo "\n\n\$xml:\n\n"; print_r($xml); $codeZero = null; foreach ($xml->code->children() as $child) { $codeZero = $child; } echo "\n\n\$codeZero:\n\n"; var_dump($codeZero); $lat = null; foreach ($codeZero->children() as $child) { if (isset($child->lat)) { $lat = $child->lat; } } echo "\n\n\$lat:\n\n"; var_dump($lat);

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.130.0050.00316.66
8.3.120.0090.00018.93
8.3.110.0120.00620.94
8.3.100.0050.00324.06
8.3.90.0060.00926.77
8.3.80.0070.00319.36
8.3.70.0130.00616.75
8.3.60.0110.00718.31
8.3.50.0110.00816.65
8.3.40.0100.00618.87
8.3.30.0090.00618.92
8.3.20.0050.00320.64
8.3.10.0090.00020.96
8.3.00.0030.00620.99
8.2.250.0100.01018.54
8.2.240.0100.00717.34
8.2.230.0090.00322.58
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0000.00918.88
8.2.190.0070.00716.88
8.2.180.0100.01016.63
8.2.170.0000.01522.96
8.2.160.0090.00922.34
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.12
8.2.120.0040.00426.35
8.2.110.0080.00022.53
8.2.100.0080.00417.97
8.2.90.0050.00318.34
8.2.80.0030.00618.34
8.2.70.0060.00317.63
8.2.60.0000.00817.75
8.2.50.0030.00617.75
8.2.40.0090.00017.84
8.2.30.0040.00419.48
8.2.20.0000.00818.18
8.2.10.0000.00718.34
8.2.00.0030.00618.17
8.1.300.0070.01316.45
8.1.290.0090.00030.84
8.1.280.0060.01225.92
8.1.270.0030.00622.30
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00024.22
8.1.230.0040.00722.94
8.1.220.0030.00617.91
8.1.210.0050.00318.90
8.1.200.0000.00817.48
8.1.190.0030.00517.61
8.1.180.0050.00318.10
8.1.170.0060.00318.67
8.1.160.0050.00219.13
8.1.150.0070.00020.38
8.1.140.0050.00219.77
8.1.130.0030.00319.16
8.1.120.0030.00517.72
8.1.110.0050.00317.63
8.1.100.0030.00617.58
8.1.90.0000.00817.60
8.1.80.0000.00717.70
8.1.70.0030.00717.57
8.1.60.0030.00617.68
8.1.50.0000.00817.69
8.1.40.0110.00017.52
8.1.30.0080.00017.84
8.1.20.0080.00017.76
8.1.10.0000.00817.74
8.1.00.0080.00017.78
8.0.300.0000.00720.02
8.0.290.0040.00416.75
8.0.280.0040.00418.57
8.0.270.0030.00317.34
8.0.260.0000.00719.09
8.0.250.0000.00717.06
8.0.240.0000.00717.05
8.0.230.0030.00317.13
8.0.220.0030.00317.10
8.0.210.0000.00717.02
8.0.200.0030.00317.10
8.0.190.0040.00417.15
8.0.180.0000.00817.00
8.0.170.0040.00317.14
8.0.160.0030.00517.07
8.0.150.0000.00717.05
8.0.140.0040.00417.03
8.0.130.0000.00713.50
8.0.120.0040.00417.02
8.0.110.0040.00417.06
8.0.100.0070.00016.98
8.0.90.0080.00016.94
8.0.80.0060.01517.09
8.0.70.0040.00417.04
8.0.60.0040.00416.95
8.0.50.0040.00416.98
8.0.30.0080.00717.36
8.0.20.0090.01117.45
8.0.10.0000.00817.08
8.0.00.0070.01116.93
7.4.330.0050.00015.55
7.4.320.0040.00416.68
7.4.300.0000.00616.81
7.4.290.0030.00316.81
7.4.280.0100.00016.68
7.4.270.0040.00416.83
7.4.260.0070.00016.81
7.4.250.0070.00016.79
7.4.240.0030.00316.67
7.4.230.0000.00716.84
7.4.220.0150.00316.56
7.4.210.0040.01116.71
7.4.200.0070.00016.73
7.4.160.0050.01016.62
7.4.150.0130.00717.40
7.4.140.0110.00817.86
7.4.130.0170.00816.55
7.4.120.0100.01016.78
7.4.110.0060.01316.58
7.4.100.0120.00616.84
7.4.90.0090.00916.62
7.4.80.0160.00719.39
7.4.70.0100.00716.79
7.4.60.0030.01316.54
7.4.50.0160.00316.58
7.4.40.0140.00316.68
7.4.30.0060.01116.82
7.4.00.0120.00314.86
7.3.330.0030.00313.25
7.3.320.0000.00613.21
7.3.310.0030.00316.50
7.3.300.0030.00416.48
7.3.290.0140.00116.48
7.3.280.0100.00716.47
7.3.270.0110.00617.40
7.3.260.0080.01416.62
7.3.250.0110.00716.54
7.3.240.0130.00516.76
7.3.230.0050.01916.48
7.3.210.0140.00416.86
7.3.200.0000.01716.44
7.3.190.0080.00816.70
7.3.180.0040.01216.43
7.3.170.0060.01116.75
7.3.160.0030.01616.75
7.2.330.0140.01116.93
7.2.320.0100.01016.75
7.2.310.0080.00916.87
7.2.300.0110.00816.83
7.2.290.0040.01416.89
7.2.60.0260.00516.83
7.1.200.0150.00316.03
7.1.90.0050.00818.28
7.1.80.0000.01318.16
7.1.70.0000.01317.09
7.1.60.0180.00734.79
7.1.50.0240.00334.77
7.1.40.0220.00334.32
7.1.30.0170.01034.57
7.1.20.0200.00734.51
7.1.10.0060.00816.61
7.1.00.0080.00516.71
7.0.230.0100.00617.77
7.0.220.0050.00817.58
7.0.210.0050.00916.54
7.0.200.0000.01416.83
7.0.190.0060.00916.93
7.0.180.0060.00616.39
7.0.170.0030.01416.39
7.0.160.0070.00716.58
7.0.150.0040.00916.36
7.0.140.0070.00716.38
7.0.130.0030.01116.63
7.0.120.0030.01216.59
7.0.110.0060.00816.52
7.0.100.0060.00916.30
7.0.90.0060.00616.36
7.0.80.0000.01316.47
7.0.70.0100.00316.34
7.0.60.0090.00316.11
7.0.50.0100.00316.65
7.0.40.0110.00316.53
7.0.30.0060.00616.43
7.0.20.0110.00316.56
7.0.10.0100.00416.39
7.0.00.0120.00016.45

preferences:
67.56 ms | 403 KiB | 5 Q