3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA <PportTimetable timetableID="20180124020740"> <Journey rid="201801247176474" uid="G76474" trainId="2H98" ssd="2018-01-24" toc="SN"> <OR tpl="BCKNMJC" act="TB" ptd="07:15" wtd="07:15" /> <IP tpl="BIRKBCK" act="T " pta="07:18" ptd="07:18" wta="07:17:30" wtd="07:18" /> <PP tpl="CRYSBRJ" wtp="07:20" /> <IP tpl="CRYSTLP" act="T " plat="1" pta="07:22" ptd="07:22" wta="07:21:30" wtd="07:22" /> <IP tpl="GIPSYH" act="T " pta="07:25" ptd="07:25" wta="07:24:30" wtd="07:25" /> <IP tpl="WNORWOD" act="T " plat="1" pta="07:28" ptd="07:28" wta="07:27:30" wtd="07:28" /> <PP tpl="WNORWDJ" wtp="07:29" /> <IP tpl="TULSEH" act="T " plat="3" pta="07:31" ptd="07:34" wta="07:31" wtd="07:34" /> <IP tpl="NDULWCH" act="T " pta="07:37" ptd="07:37" wta="07:36:30" wtd="07:37:30" /> <IP tpl="EDULWCH" act="T " pta="07:39" ptd="07:40" wta="07:39" wtd="07:40" /> <IP tpl="PKHMRYC" act="T " plat="2" pta="07:42" ptd="07:43" wta="07:42" wtd="07:43" /> <IP tpl="PCKHMQD" act="T " plat="1" pta="07:45" ptd="07:45" wta="07:45" wtd="07:45:30" /> <PP tpl="OLDKRDJ" wtp="07:46" /> <DT tpl="SBRMNDS" act="TF" pta="07:52" wta="07:52" /> </Journey> <Journey rid="201801248980806" uid="Y80806" trainId="5G45" ssd="2018-01-24" toc="VT" trainCat="EE" isPassengerSvc="false"> <OPOR tpl="WVRMPTN" act="TB" plat="1" wtd="22:40" /> <PP tpl="WVRMTNJ" wtp="22:41:30" /> <PP tpl="WVRMSRJ" wtp="22:44" /> <OPDT tpl="OXLEYCS" act="TF" wta="22:47" /> </Journey> </PportTimetable> DATA; $xml = simplexml_load_string($data); $timetableId = $xml->attributes()->timetableID; echo "Timetable id: " . $timetableId . "\n\r"; foreach ($xml->Journey as $Journey) { echo "Journey data: " . $Journey["rid"] . "\n\r"; echo "Journey data: " . $Journey["uid"] . "\n\r"; echo "Journey data: " . $Journey["trainId"] . "\n\r"; echo "Journey data: " . $Journey["ssd"] . "\n\r"; echo "Journey data: " . $Journey["toc"] . "\n\r"; foreach ($Journey->children() as $child) { if ($child->getName() === "IP") { echo $child['tpl'] . PHP_EOL; } } }

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.4.140.0130.00917.86
8.4.130.0130.00818.07
8.4.120.0120.00720.87
8.4.110.0150.00622.70
8.4.100.0040.00618.16
8.4.90.0070.00422.14
8.4.80.0140.00318.05
8.4.70.0090.01118.09
8.4.60.0100.00719.21
8.4.50.0030.00522.85
8.4.40.0090.00018.07
8.4.30.0070.01317.89
8.4.20.0070.01319.71
8.4.10.0130.00719.61
8.3.270.0110.01016.71
8.3.260.0110.00916.76
8.3.250.0110.00821.01
8.3.240.0120.00817.12
8.3.230.0160.00416.45
8.3.220.0110.00517.58
8.3.210.0050.00318.57
8.3.200.0040.00516.55
8.3.190.0090.01017.28
8.3.180.0050.00416.94
8.3.170.0130.00317.51
8.3.160.0080.00020.84
8.3.150.0110.00718.52
8.3.140.0040.00417.35
8.3.130.0050.00318.66
8.3.120.0000.00920.96
8.3.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0070.00318.68
8.3.70.0090.00618.81
8.3.60.0080.00818.81
8.3.50.0070.00718.52
8.3.40.0110.00719.09
8.3.30.0090.00918.75
8.3.20.0000.00720.41
8.3.10.0050.00323.69
8.3.00.0040.00420.04
8.2.290.0110.00921.00
8.2.280.0090.01118.69
8.2.270.0150.00317.46
8.2.260.0110.00717.00
8.2.250.0060.00318.49
8.2.240.0090.00017.65
8.2.230.0030.00622.58
8.2.220.0100.00737.54
8.2.210.0090.00626.77
8.2.200.0050.00517.00
8.2.190.0040.01118.79
8.2.180.0140.00718.54
8.2.170.0060.00922.96
8.2.160.0110.00719.71
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0070.00020.85
8.2.110.0100.00020.77
8.2.100.0040.00818.16
8.2.90.0030.00617.97
8.2.80.0040.00419.24
8.2.70.0050.00318.15
8.2.60.0000.01018.47
8.2.50.0040.00418.34
8.2.40.0050.00220.71
8.2.30.0040.00419.74
8.2.20.0070.00418.27
8.2.10.0040.00418.40
8.2.00.0000.00818.53
8.1.330.0140.00522.35
8.1.320.0090.01116.54
8.1.310.0040.00418.71
8.1.300.0040.00417.94
8.1.290.0060.00330.84
8.1.280.0000.01925.92
8.1.270.0060.00324.06
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00622.65
8.1.230.0080.00321.22
8.1.220.0040.00418.02
8.1.210.0080.00018.89
8.1.200.0100.00317.47
8.1.190.0030.00617.47
8.1.180.0050.00318.10
8.1.170.0080.00018.96
8.1.160.0040.00419.13
8.1.150.0040.00320.52
8.1.140.0050.00317.89
8.1.130.0030.00319.03
8.1.120.0080.00017.80
8.1.110.0090.00017.59
8.1.100.0050.00317.73
8.1.90.0040.00417.57
8.1.80.0030.00617.81
8.1.70.0000.00717.64
8.1.60.0000.00817.88
8.1.50.0080.00017.81
8.1.40.0000.00817.75
8.1.30.0000.01117.98
8.1.20.0040.00417.83
8.1.10.0000.00717.90
8.1.00.0030.00517.63
8.0.300.0060.00320.29
8.0.290.0050.00317.13
8.0.280.0000.00718.75
8.0.270.0060.00317.12
8.0.260.0040.00417.10
8.0.250.0000.00717.20
8.0.240.0030.00517.16
8.0.230.0040.00317.34
8.0.220.0000.00817.25
8.0.210.0000.00717.13
8.0.200.0060.00017.26
8.0.190.0040.00417.29
8.0.180.0030.00517.32
8.0.170.0080.00017.18
8.0.160.0070.00017.27
8.0.150.0040.00417.11
8.0.140.0000.00717.16
8.0.130.0060.00013.54
8.0.120.0050.00317.21
8.0.110.0000.00717.22
8.0.100.0040.00417.00
8.0.90.0080.00017.32
8.0.80.0130.00317.23
8.0.70.0040.00417.10
8.0.60.0040.00417.13
8.0.50.0000.00817.09
8.0.30.0100.01117.47
8.0.20.0090.01117.54
8.0.10.0030.00517.11
8.0.00.0110.00817.04
7.4.330.0050.00015.55
7.4.320.0060.00016.74
7.4.300.0000.00616.76
7.4.290.0050.00316.72
7.4.280.0040.00416.92
7.4.270.0070.00016.73
7.4.260.0040.00416.85
7.4.250.0040.00416.65
7.4.240.0030.00516.76
7.4.230.0040.00416.58
7.4.220.0000.00816.96
7.4.210.0120.00416.79
7.4.200.0030.00316.96
7.4.160.0060.01116.71
7.4.150.0110.00717.40
7.4.140.0100.01117.86
7.4.130.0100.01316.80
7.4.120.0110.01016.76
7.4.110.0060.01216.82
7.4.100.0130.00316.91
7.4.90.0040.01816.77
7.4.80.0090.00919.39
7.4.70.0150.00916.59
7.4.60.0060.01016.91
7.4.50.0060.01016.96
7.4.40.0100.00716.85
7.4.00.0060.00615.08
7.3.330.0080.00013.54
7.3.320.0000.00513.49
7.3.310.0040.00416.58
7.3.300.0070.00016.73
7.3.290.0070.00816.56
7.3.280.0050.01316.65
7.3.270.0060.01017.40
7.3.260.0100.01316.65
7.3.250.0140.00516.69
7.3.240.0110.00916.68
7.3.230.0030.01516.74
7.3.210.0130.00416.61
7.3.200.0060.01316.64
7.3.190.0090.00616.76
7.3.180.0100.00916.85
7.3.170.0060.01216.74
7.3.160.0130.00516.64
7.3.10.0040.01116.70
7.3.00.0050.00816.78
7.2.330.0100.00716.84
7.2.320.0070.01716.83
7.2.310.0070.01317.07
7.2.300.0070.01317.04
7.2.290.0110.00516.98
7.2.130.0050.00917.02
7.2.120.0040.00916.97
7.2.110.0040.00917.03
7.2.100.0100.00317.04
7.2.90.0080.00616.99
7.2.80.0040.00916.96
7.2.70.0070.00517.16
7.2.60.0060.00717.06
7.2.50.0050.00817.11
7.2.40.0040.00917.13
7.2.30.0090.00416.97
7.2.20.0070.00617.15
7.2.10.0200.01017.36
7.2.00.0240.00717.39
7.1.250.0090.00615.92
7.1.240.0030.01015.89
7.1.230.0000.01115.86
7.1.220.0140.00015.86
7.1.210.0060.00615.91
7.1.200.0060.00715.84
7.1.190.0100.00516.26
7.1.180.0090.00615.89
7.1.170.0090.00615.86
7.1.160.0070.00715.82
7.1.150.0070.00715.90
7.1.140.0130.00015.85
7.1.130.0270.00516.31
7.1.120.0270.00916.43
7.1.110.0290.01116.12
7.1.100.0180.01116.03
7.1.90.0320.00516.12
7.1.80.0220.00916.15
7.1.70.0260.00615.73
7.1.60.0290.00824.64
7.1.50.0200.00924.55
7.1.40.0240.01524.31
7.1.30.0350.00824.30
7.1.20.0420.01424.26
7.1.10.0290.01215.31
7.1.00.0500.01115.46
7.0.330.0100.00715.62
5.6.380.0030.00614.61

preferences:
30 ms | 403 KiB | 5 Q