3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <types> <type name="ACOGOptic"> <nominal>15</nominal> <lifetime>14400</lifetime> <restock>1800</restock> <min>8</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/> <category name="weapons"/> <usage name="Military"/> </type> </types> XML; $dom = new DOMDocument(); $dom->loadxml($xml); $xpath = new DOMXPath($dom); echo $xpath->evaluate('string(/types/type[@name]/@name)');

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.5.20.0090.00918.20
8.5.10.0090.00916.82
8.5.00.0140.00819.99
8.4.170.0170.00520.50
8.4.160.0150.01224.10
8.4.150.0080.00517.11
8.4.140.0130.00817.99
8.4.130.0090.01217.82
8.4.120.0120.00826.30
8.4.110.0110.00919.05
8.4.100.0100.01117.98
8.4.90.0130.00620.65
8.4.80.0040.00619.21
8.4.70.0070.00218.32
8.4.60.0120.01018.14
8.4.50.0170.00320.78
8.4.40.0070.01318.26
8.4.30.0130.00319.08
8.4.20.0160.00319.21
8.4.10.0100.00019.65
8.3.290.0110.01121.20
8.3.280.0060.00416.28
8.3.270.0120.00817.04
8.3.260.0100.00916.83
8.3.250.0040.00419.15
8.3.240.0070.00316.90
8.3.230.0110.00916.91
8.3.220.0090.01118.96
8.3.210.0090.00718.55
8.3.200.0130.00616.73
8.3.190.0030.00517.36
8.3.180.0120.00621.04
8.3.170.0140.00421.01
8.3.160.0110.00717.11
8.3.150.0000.00819.26
8.3.140.0040.00417.54
8.3.130.0090.00018.70
8.3.120.0030.00619.09
8.3.110.0050.00320.94
8.3.100.0030.01524.06
8.3.90.0110.00726.77
8.3.80.0030.00618.68
8.3.70.0070.01117.00
8.3.60.0040.01216.88
8.3.50.0120.00318.55
8.3.40.0070.01120.67
8.3.30.0140.00020.71
8.3.20.0040.00424.18
8.3.10.0090.00922.05
8.3.00.0160.00319.20
8.2.300.0120.01018.38
8.2.290.0110.00817.50
8.2.280.0100.00917.29
8.2.270.0090.00917.45
8.2.260.0110.00420.45
8.2.250.0140.00716.88
8.2.240.0000.00917.26
8.2.230.0000.01022.58
8.2.220.0100.00037.54
8.2.210.0100.00026.77
8.2.200.0070.00718.78
8.2.190.0070.01418.54
8.2.180.0110.00417.00
8.2.170.0120.00319.30
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0100.00720.63
8.2.130.0070.01020.95
8.2.120.0120.00319.18
8.2.110.0130.00719.22
8.2.100.0130.00721.19
8.2.90.0040.01120.93
8.2.80.0070.01320.57
8.2.70.0100.01021.00
8.2.60.0030.01620.85
8.2.50.0090.00920.97
8.2.40.0150.00420.81
8.2.30.0150.00420.94
8.2.20.0120.00920.76
8.2.10.0040.01120.93
8.2.00.0090.00619.04
8.1.340.0100.01017.89
8.1.330.0140.00616.66
8.1.320.0110.00818.21
8.1.310.0070.01119.07
8.1.300.0060.00318.29
8.1.290.0080.00830.84
8.1.280.0070.00725.92
8.1.270.0060.00822.51
8.1.260.0090.00622.36
8.1.250.0080.00822.42
8.1.240.0110.00419.00
8.1.230.0110.00318.88
8.1.220.0120.00321.07
8.1.210.0090.00618.69
8.1.200.0060.00318.81
8.1.190.0040.00418.84
8.1.180.0040.01118.68
8.1.170.0040.00418.74
8.1.160.0040.00418.82
8.1.150.0050.00318.60
8.1.140.0120.00318.61
8.1.130.0050.00319.10
8.1.120.0040.01118.88
8.1.110.0040.00418.80
8.1.100.0030.00618.88
8.1.90.0080.00018.94
8.1.80.0040.00418.88
8.1.70.0080.00018.75
8.1.60.0080.00018.91
8.1.50.0040.00418.70
8.1.40.0080.00018.91
8.1.30.0040.00418.98
8.1.20.0080.00018.88
8.1.10.0060.00319.06
8.1.00.0080.00020.77

preferences:
91.65 ms | 403 KiB | 5 Q