3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Information> <Events> <Event> <Time>3141.29</Time> <PrimaryObject ID="487"> <Name>Player1</Name> <Country>us</Country> </PrimaryObject> <Action>Move</Action> <SecondaryObject ID="814"> <Name>Dog</Name> <Parent>487</Parent> </SecondaryObject> </Event> <Event> <Time>3141.29</Time> <PrimaryObject ID="488"> <Name>Player2</Name> <Country>us</Country> </PrimaryObject> <Action>Move</Action> <SecondaryObject ID="814"> <Name>Dog</Name> <Parent>488</Parent> </SecondaryObject> </Event> </Events> </Information> DATA; $xml=simplexml_load_string($data) or die("Error: Cannot create object"); foreach($xml->Events->Event as $events) { $id = $events->PrimaryObject->attributes(); $name = $events->PrimaryObject->Name; echo $id['ID'].' '. $name . 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.10.0060.00321.60
8.3.140.0040.00416.89
8.3.130.0030.00518.81
8.3.120.0060.00319.21
8.3.110.0060.00616.83
8.3.100.0070.00324.06
8.3.90.0110.00426.77
8.3.80.0000.00917.00
8.3.70.0090.00916.88
8.3.60.0150.00016.88
8.3.50.0250.00723.80
8.3.40.0150.00419.27
8.3.30.0130.00619.10
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.260.0070.01117.29
8.2.250.0000.00816.88
8.2.240.0030.00719.38
8.2.230.0100.00020.94
8.2.220.0040.00437.54
8.2.210.0000.00826.77
8.2.200.0050.00516.63
8.2.190.0090.01216.88
8.2.180.0040.01125.92
8.2.170.0100.01019.21
8.2.160.0030.01022.96
8.2.150.0060.00325.66
8.2.140.0060.01224.66
8.2.130.0110.00026.16
8.2.120.0030.00719.26
8.2.110.0090.00020.68
8.2.100.0060.00618.03
8.2.90.0110.00017.88
8.2.80.0080.00018.80
8.2.70.0030.00517.88
8.2.60.0060.00318.34
8.2.50.0080.00318.10
8.2.40.0000.00819.49
8.2.30.0000.00719.46
8.2.20.0040.00418.32
8.2.10.0050.00219.46
8.2.00.0040.00419.47
8.1.310.0070.00718.93
8.1.300.0050.00318.87
8.1.290.0060.00318.88
8.1.280.0160.00825.92
8.1.270.0040.00424.00
8.1.260.0110.00726.35
8.1.250.0000.00828.09
8.1.240.0090.00021.03
8.1.230.0080.00319.36
8.1.220.0030.00618.03
8.1.210.0000.00818.77
8.1.200.0060.00317.48
8.1.190.0000.00817.35
8.1.180.0060.00318.10
8.1.170.0030.00618.90
8.1.160.0000.00719.21
8.1.150.0040.00419.17
8.1.140.0040.00419.11
8.1.130.0000.00820.32
8.1.120.0030.00517.75
8.1.110.0050.00517.64
8.1.100.0040.00417.75
8.1.90.0040.00417.55
8.1.80.0030.00617.51
8.1.70.0070.00317.68
8.1.60.0040.00417.77
8.1.50.0000.00817.62
8.1.40.0000.00817.62
8.1.30.0040.00417.69
8.1.20.0000.00817.78
8.1.10.0040.00417.87
8.1.00.0040.00417.66
8.0.300.0070.00319.95
8.0.290.0000.00817.00
8.0.280.0070.00018.62
8.0.270.0000.00717.10
8.0.260.0030.00518.63
8.0.250.0030.00317.16
8.0.240.0000.00617.29
8.0.230.0030.00317.15
8.0.220.0030.00517.07
8.0.210.0030.00317.25
8.0.200.0030.00317.24
8.0.190.0040.00417.15
8.0.180.0040.00417.10
8.0.170.0060.00317.06
8.0.160.0050.00517.23
8.0.150.0040.00417.14
8.0.140.0000.00717.05
8.0.130.0030.00313.66
8.0.120.0040.00417.09
8.0.110.0040.00417.11
8.0.100.0050.00317.09
8.0.90.0000.00717.02
8.0.80.0060.01017.14
8.0.70.0040.00417.15
8.0.60.0080.00017.09
8.0.50.0040.00417.09
8.0.30.0100.00717.30
8.0.20.0090.01017.34
8.0.10.0040.00417.29
8.0.00.0150.00317.05
7.4.330.0000.00415.55
7.4.320.0000.00616.57
7.4.300.0000.00616.82
7.4.290.0000.00816.73
7.4.280.0080.00016.77
7.4.270.0000.00816.64
7.4.260.0030.00313.47
7.4.250.0070.00016.72
7.4.240.0030.00316.69
7.4.230.0030.00316.54
7.4.220.0020.00516.61
7.4.210.0120.00416.68
7.4.200.0040.00416.76
7.4.130.0110.01216.79
7.4.120.0160.00616.67
7.4.110.0120.00616.84
7.4.100.0090.00916.82
7.4.90.0030.01416.69
7.4.80.0110.01116.46
7.4.70.0070.01316.88
7.4.60.0150.00716.76
7.4.50.0150.00916.68
7.4.40.0040.01316.56
7.4.30.0090.01516.70
7.4.20.0070.01016.61
7.4.10.0080.00816.81
7.4.00.0070.01016.79
7.3.330.0070.00016.67
7.3.320.0030.00313.33
7.3.310.0000.00816.67
7.3.300.0000.00716.61
7.3.290.0070.00916.56
7.3.260.0140.00716.60
7.3.230.0100.00616.49
7.3.210.0140.00416.64
7.3.200.0140.00316.57
7.3.190.0120.00916.77
7.3.180.0140.00716.61
7.3.170.0090.00916.57
7.3.160.0170.00716.75
7.3.150.0000.01716.48
7.3.140.0040.01516.82
7.3.130.0070.01116.52
7.3.120.0140.00316.57
7.3.110.0130.00316.60
7.3.100.0160.00416.56
7.3.90.0090.01316.78
7.3.80.0060.00916.54
7.3.70.0080.00816.62
7.3.60.0060.01216.74
7.3.50.0160.00316.70
7.3.40.0150.00416.62
7.3.30.0140.00316.65
7.3.20.0130.00616.69
7.3.10.0130.00316.62
7.3.00.0100.00716.54
7.2.330.0110.00816.61
7.2.320.0100.01017.00
7.2.310.0140.00316.93
7.2.300.0170.00016.70
7.2.290.0110.01416.99
7.2.280.0100.00717.00
7.2.270.0140.00316.71
7.2.260.0070.01116.76
7.2.250.0070.01016.91
7.2.240.0090.00917.06
7.2.230.0060.01216.90
7.2.220.0000.01816.95
7.2.210.0080.01116.81
7.2.200.0070.01016.67
7.2.190.0040.01316.67
7.2.180.0100.00616.77
7.2.170.0090.00916.76
7.2.160.0060.01116.81
7.2.150.0060.01216.85
7.2.140.0080.01216.80
7.2.130.0060.01816.79
7.2.120.0210.00516.85
7.2.110.0140.00816.92
7.2.100.0080.01616.73
7.2.90.0120.00616.97
7.2.80.0130.00716.84
7.2.70.0090.01316.80
7.2.60.0130.00716.84
7.2.50.0190.00416.68
7.2.40.0160.00816.86
7.2.30.0080.01316.76
7.2.20.0080.01216.90
7.2.10.0060.01216.88
7.2.00.0110.01116.83

preferences:
29.38 ms | 403 KiB | 5 Q