3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<< HERE <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book id="bk103"> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> <book id="bk104"> <author>Corets, Eva</author> <title>Oberon's Legacy</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2001-03-10</publish_date> <description>In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant.</description> </book> <book id="bk105"> <author>Corets, Eva</author> <title>The Sundered Grail</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2001-09-10</publish_date> <description>The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy.</description> </book> <book id="bk106"> <author>Randall, Cynthia</author> <title>Lover Birds</title> <genre>Romance</genre> <price>4.95</price> <publish_date>2000-09-02</publish_date> <description>When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled.</description> </book> <book id="bk107"> <author>Thurman, Paula</author> <title>Splish Splash</title> <genre>Romance</genre> <price>4.95</price> <publish_date>2000-11-02</publish_date> <description>A deep sea diver finds true love twenty thousand leagues beneath the sea.</description> </book> <book id="bk108"> <author>Knorr, Stefan</author> <title>Creepy Crawlies</title> <genre>Horror</genre> <price>4.95</price> <publish_date>2000-12-06</publish_date> <description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description> </book> <book id="bk109"> <author>Kress, Peter</author> <title>Paradox Lost</title> <genre>Science Fiction</genre> <price>6.95</price> <publish_date>2000-11-02</publish_date> <description>After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum.</description> </book> <book id="bk110"> <author>O'Brien, Tim</author> <title>Microsoft .NET: The Programming Bible</title> <genre>Computer</genre> <price>36.95</price> <publish_date>2000-12-09</publish_date> <description>Microsoft's .NET initiative is explored in detail in this deep programmer's reference.</description> </book> <book id="bk111"> <author>O'Brien, Tim</author> <title>MSXML3: A Comprehensive Guide</title> <genre>Computer</genre> <price>36.95</price> <publish_date>2000-12-01</publish_date> <description>The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more.</description> </book> <book id="bk112"> <author>Galos, Mike</author> <title>Visual Studio 7: A Comprehensive Guide</title> <genre>Computer</genre> <price>49.95</price> <publish_date>2001-04-16</publish_date> <description>Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment.</description> </book> </catalog> HERE; $n = new SimpleXMLElement($xml); $r = $n->xpath('catalog/book'); var_dump($r);

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.40.0120.00319.22
8.3.30.0030.01020.66
8.3.20.0030.00520.59
8.3.10.0050.00321.52
8.3.00.0040.00422.95
8.2.170.0160.00322.96
8.2.160.0030.01822.58
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00421.31
8.2.110.0000.00919.67
8.2.100.0110.00018.09
8.2.90.0030.00518.53
8.2.80.0070.00317.97
8.2.70.0050.00318.30
8.2.60.0040.00418.18
8.2.50.0090.00018.41
8.2.40.0090.00020.81
8.2.30.0000.00819.85
8.2.20.0000.00718.11
8.2.10.0040.00418.02
8.2.00.0050.00518.05
8.1.270.0050.00323.99
8.1.260.0050.00526.35
8.1.250.0150.00028.09
8.1.240.0120.00022.18
8.1.230.0110.00021.33
8.1.220.0080.00017.93
8.1.210.0000.00819.26
8.1.200.0040.00417.73
8.1.190.0030.00517.61
8.1.180.0030.00518.10
8.1.170.0030.00518.79
8.1.160.0040.00419.25
8.1.150.0040.00418.93
8.1.140.0080.00017.75
8.1.130.0000.00718.39
8.1.120.0050.00317.76
8.1.110.0040.00417.65
8.1.100.0000.00717.68
8.1.90.0000.00717.87
8.1.80.0000.00717.67
8.1.70.0030.00317.66
8.1.60.0040.00417.93
8.1.50.0030.00617.95
8.1.40.0040.00417.84
8.1.30.0040.00417.84
8.1.20.0000.00817.95
8.1.10.0030.00517.96
8.1.00.0000.00717.68
8.0.300.0000.00820.40
8.0.290.0090.00017.25
8.0.280.0000.00818.76
8.0.270.0040.00417.68
8.0.260.0000.00717.20
8.0.250.0030.00317.46
8.0.240.0060.00317.21
8.0.230.0000.00717.44
8.0.220.0000.00717.15
8.0.210.0070.00017.40
8.0.200.0030.00317.49
8.0.190.0060.00317.44
8.0.180.0030.00717.42
8.0.170.0040.00417.43
8.0.160.0030.00317.14
8.0.150.0070.00017.23
8.0.140.0040.00717.32
8.0.130.0000.00613.78
8.0.120.0040.00417.23
8.0.110.0030.00517.30
8.0.100.0090.00017.30
8.0.90.0000.00717.41
8.0.80.0040.01117.33
8.0.70.0040.00417.13
8.0.60.0050.00217.15
8.0.50.0050.00317.32
8.0.30.0130.01017.39
8.0.20.0080.01117.52
8.0.10.0040.00417.51
8.0.00.0140.00817.15
7.4.330.0050.00017.25
7.4.320.0000.00616.91
7.4.300.0070.00016.76
7.4.290.0050.00316.96
7.4.280.0040.00416.93
7.4.270.0040.00416.89
7.4.260.0030.00313.50
7.4.250.0080.00016.82
7.4.240.0020.00516.90
7.4.230.0000.00716.84
7.4.220.0090.00917.00
7.4.210.0070.01216.91
7.4.200.0030.00317.07
7.4.190.0030.00517.11
7.4.160.0110.01516.90
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0050.01116.98
7.4.120.0060.01216.90
7.4.110.0140.00316.87
7.4.100.0150.00416.91
7.4.90.0110.00616.89
7.4.80.0040.01419.39
7.4.70.0070.01516.91
7.4.60.0090.00916.81
7.4.50.0030.00616.59
7.4.40.0030.01322.77
7.4.30.0090.01216.91
7.4.00.0070.00715.04
7.3.330.0000.00613.27
7.3.320.0000.00613.45
7.3.310.0030.00316.70
7.3.300.0040.00416.64
7.3.290.0040.01216.60
7.3.280.0090.00816.63
7.3.270.0080.00817.40
7.3.260.0130.01318.24
7.3.250.0110.01016.83
7.3.240.0100.00716.95
7.3.230.0090.00916.62
7.3.210.0040.01316.65
7.3.200.0110.01119.39
7.3.190.0040.01916.87
7.3.180.0100.00716.90
7.3.170.0120.00616.91
7.3.160.0070.01016.60
7.3.120.0130.00314.98
7.2.330.0140.00716.95
7.2.320.0070.01316.99
7.2.310.0090.00916.85
7.2.300.0060.01116.56
7.2.290.0070.01016.63
7.2.60.0100.00316.83
7.2.00.0060.00919.55
7.1.200.0000.01215.72
7.1.100.0060.00618.25
7.1.70.0000.00817.39
7.1.60.0210.00419.17
7.1.50.0100.01317.35
7.1.00.0030.05722.69
7.0.200.0410.00314.88
7.0.140.0030.07322.29
7.0.60.0130.03320.17
7.0.50.0070.07718.11
7.0.40.0070.04720.41
7.0.30.0130.04720.35
7.0.20.0200.04320.34
7.0.10.0070.04020.37
7.0.00.0030.08720.22
5.6.280.0070.06720.97
5.6.210.0130.06321.05
5.6.200.0100.05718.41
5.6.190.0030.08020.64
5.6.180.0270.08020.61
5.6.170.0130.04320.70
5.6.160.0100.08020.80
5.6.150.0030.07018.41
5.6.140.0070.03718.43
5.6.130.0100.05018.45
5.6.120.0100.03321.21
5.6.110.0070.09321.20
5.6.100.0070.08721.23
5.6.90.0000.06721.22
5.6.80.0030.08320.74
5.5.350.0300.07320.68
5.5.340.0100.08018.17
5.5.330.0100.04020.46
5.5.320.0200.04020.51
5.5.310.0270.07720.54
5.5.300.0070.07018.22
5.5.290.0030.08018.12
5.5.280.0030.05320.99
5.5.270.0070.04020.98
5.5.260.0030.04320.98
5.5.250.0100.07720.80
5.5.240.0130.04720.48
5.4.450.0230.06319.45
5.4.440.0200.08019.73
5.4.430.0200.06019.43
5.4.420.0270.03719.80
5.4.410.0130.04319.32
5.4.400.0170.07719.24
5.4.390.0230.05019.43
5.4.380.0270.05019.33
5.4.370.0270.05719.10
5.4.360.0270.06319.38
5.4.350.0300.07019.26
5.4.340.0230.05019.13
5.4.320.0270.04719.26
5.4.310.0300.04719.27
5.4.300.0230.05019.39
5.4.290.0270.07319.28
5.4.280.0300.04319.45
5.4.270.0530.06719.34
5.4.260.0230.07019.27
5.4.250.0270.04719.43
5.4.240.0270.07719.13
5.4.230.0500.06319.11
5.4.220.0300.06319.42
5.4.210.0170.05319.23
5.4.200.0470.06319.39
5.4.190.0300.06019.23
5.4.180.0600.05319.22
5.4.170.0270.03319.32
5.4.160.0300.06319.38
5.4.150.0430.06019.11
5.4.140.0270.06316.49
5.4.130.0270.05716.48
5.4.120.0400.05316.52
5.4.110.0230.05716.69
5.4.100.0300.06716.70
5.4.90.0230.04716.69
5.4.80.0230.07016.62
5.4.70.0270.06716.67
5.4.60.0330.05316.49
5.4.50.0300.06016.66
5.4.40.0330.04716.67
5.4.30.0300.07016.40
5.4.20.0330.06016.66
5.4.10.0130.05716.40
5.4.00.0300.06316.23
5.3.290.0300.06714.77
5.3.280.0200.03714.73
5.3.270.0200.03714.72
5.3.260.0230.03314.89
5.3.250.0270.06714.70
5.3.240.0230.05014.74
5.3.230.0270.03714.90
5.3.220.0230.04714.86
5.3.210.0230.03014.77
5.3.200.0230.05714.63
5.3.190.0170.04014.82
5.3.180.0270.04014.67
5.3.170.0170.03714.82
5.3.160.0230.03014.86
5.3.150.0230.03714.66
5.3.140.0370.03014.85
5.3.130.0270.02714.61
5.3.120.0170.04014.75
5.3.110.0230.03014.64
5.3.100.0270.02714.13
5.3.90.0300.02714.32
5.3.80.0200.03314.11
5.3.70.0200.03314.17
5.3.60.0270.03714.10
5.3.50.0230.03014.05
5.3.40.0230.04014.23
5.3.30.0170.03714.11
5.3.20.0170.03313.95
5.3.10.0200.03313.79
5.3.00.0200.03313.92
5.2.170.0170.02711.34
5.2.160.0100.03311.25
5.2.150.0100.03311.41
5.2.140.0170.03011.27
5.2.130.0230.02011.30
5.2.120.0100.03011.25
5.2.110.0170.02311.46
5.2.100.0170.02711.21
5.2.90.0170.03711.23
5.2.80.0170.02711.19
5.2.70.0100.03311.45
5.2.60.0170.02711.41
5.2.50.0100.02711.22
5.2.40.0200.02011.09
5.2.30.0130.02711.07
5.2.20.0130.02711.19
5.2.10.0070.03311.30
5.2.00.0200.02011.04
5.1.60.0030.03010.22
5.1.50.0130.02710.32
5.1.40.0100.02710.30
5.1.30.0130.02310.70
5.1.20.0070.03010.62
5.1.10.0130.02310.36
5.1.00.0170.02010.41
5.0.50.0070.0279.01
5.0.40.0030.0238.86
5.0.30.0100.0278.53
5.0.20.0100.0178.66
5.0.10.0070.0208.68
5.0.00.0070.0308.57
4.4.90.0030.0177.76
4.4.80.0070.0137.76
4.4.70.0070.0137.76
4.4.60.0030.0307.76
4.4.50.0070.0137.76
4.4.40.0030.0307.76
4.4.30.0030.0277.76
4.4.20.0100.0107.76
4.4.10.0070.0207.76
4.4.00.0070.0237.76
4.3.110.0030.0177.76
4.3.100.0030.0177.76
4.3.90.0070.0137.76
4.3.80.0070.0307.76
4.3.70.0100.0107.76
4.3.60.0100.0107.76
4.3.50.0070.0137.76
4.3.40.0070.0237.76
4.3.30.0000.0177.76
4.3.20.0030.0137.76
4.3.10.0000.0177.76
4.3.00.0030.0137.76

preferences:
46.24 ms | 400 KiB | 5 Q