3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version='1.0' standalone='yes'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> </character> <character> <name>Mr. Coder</name> <actor>El Act&#211;r</actor> </character> </characters> <plot> So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a documentary. </plot> <great-lines1> <line>PHP solves all my web problems</line> </great-lines1> <great-lines2> <line>PHP solves all my web problems</line> <![CDATA[always be testing!]]> </great-lines2> <great-lines3> PHP solves all my web problems <![CDATA[always be testing!]]> </great-lines3> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> </movies> XML; $sml = new SimpleXMLElement ($xml); $result1 = $sml->xpath('/movies/movie/great-lines1'); $result2 = $sml->xpath('/movies/movie/great-lines2'); $result3 = $sml->xpath('/movies/movie/great-lines3'); var_dump($result1); var_dump($result2); var_dump($result3); echo "\n<br>--------------------\n"; echo (string) $result1; echo "\n<br>--------------------\n"; echo (string) $result2; echo "\n<br>--------------------\n"; echo (string) $result3;

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.60.0040.01118.86
8.3.50.0110.00922.24
8.3.40.0160.00619.22
8.3.30.0070.00719.39
8.3.20.0000.00920.59
8.3.10.0040.00420.89
8.3.00.0080.00017.75
8.2.180.0160.00316.88
8.2.170.0070.00722.96
8.2.160.0140.00320.63
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0030.00726.16
8.2.120.0080.00022.66
8.2.110.0100.00021.49
8.2.100.0060.00618.28
8.2.90.0040.00419.42
8.2.80.0000.00817.97
8.2.70.0060.00318.00
8.2.60.0040.00418.30
8.2.50.0030.00518.10
8.2.40.0030.00618.34
8.2.30.0040.00419.67
8.2.20.0050.00218.04
8.2.10.0030.00518.45
8.2.00.0080.00018.16
8.1.280.0150.00425.92
8.1.270.0090.00024.29
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.23
8.1.230.0090.00318.07
8.1.220.0000.00818.16
8.1.210.0000.00918.77
8.1.200.0030.00617.61
8.1.190.0050.00317.60
8.1.180.0050.00318.10
8.1.170.0060.00618.86
8.1.160.0000.00922.30
8.1.150.0000.00819.18
8.1.140.0080.00017.77
8.1.130.0040.00417.83
8.1.120.0020.00517.87
8.1.110.0030.00617.88
8.1.100.0060.00317.76
8.1.90.0050.00217.76
8.1.80.0040.00417.60
8.1.70.0040.00417.70
8.1.60.0000.00818.01
8.1.50.0030.00617.86
8.1.40.0050.00317.86
8.1.30.0030.00617.96
8.1.20.0040.00417.92
8.1.10.0050.00317.92
8.1.00.0040.00417.97
8.0.300.0000.00818.77
8.0.290.0080.00017.25
8.0.280.0000.00718.80
8.0.270.0000.00717.66
8.0.260.0070.00017.29
8.0.250.0000.00717.43
8.0.240.0040.00417.46
8.0.230.0070.00017.43
8.0.220.0000.00717.24
8.0.210.0000.00817.34
8.0.200.0000.00617.45
8.0.190.0000.00717.39
8.0.180.0000.00817.36
8.0.170.0080.00017.12
8.0.160.0000.00717.29
8.0.150.0000.00817.33
8.0.140.0070.00017.28
8.0.130.0000.00913.59
8.0.120.0050.00317.27
8.0.110.0000.00717.39
8.0.100.0000.00717.10
8.0.90.0000.00817.36
8.0.80.0130.00317.24
8.0.70.0030.00617.24
8.0.60.0050.00317.38
8.0.50.0050.00317.34
8.0.30.0140.00517.63
8.0.20.0160.00717.44
8.0.10.0050.00217.55
8.0.00.0090.00917.16
7.4.330.0000.00515.45
7.4.320.0000.00716.75
7.4.300.0030.00316.91
7.4.290.0000.00716.77
7.4.280.0040.00416.93
7.4.270.0000.00716.99
7.4.260.0000.00817.01
7.4.250.0060.00316.96
7.4.240.0050.00217.05
7.4.230.0000.00717.07
7.4.220.0090.00917.04
7.4.210.0110.00316.95
7.4.200.0030.00316.97
7.4.160.0120.00616.86
7.4.150.0050.01617.40
7.4.140.0110.00817.86
7.4.130.0130.00517.00
7.4.120.0160.00216.95
7.4.110.0070.01017.02
7.4.100.0060.01216.73
7.4.90.0120.01217.02
7.4.80.0090.00918.80
7.4.70.0160.00316.88
7.4.60.0100.00716.89
7.4.50.0030.00516.77
7.4.40.0090.00916.89
7.4.30.0140.00616.87
7.4.00.0060.01015.18
7.3.330.0060.00013.59
7.3.320.0000.00713.55
7.3.310.0000.00716.75
7.3.300.0030.00316.65
7.3.290.0100.01016.77
7.3.280.0070.00816.73
7.3.270.0090.00917.40
7.3.260.0140.00716.86
7.3.250.0120.00516.68
7.3.240.0120.00717.01
7.3.230.0100.00716.50
7.3.210.0180.00016.75
7.3.200.0110.00919.39
7.3.190.0140.00916.82
7.3.180.0070.01316.75
7.3.170.0090.00916.79
7.3.160.0100.00716.81
7.3.120.0050.00914.82
7.3.110.0070.01014.93
7.3.100.0070.01214.81
7.3.90.0050.00915.07
7.3.80.0100.00315.04
7.3.70.0070.00514.85
7.3.60.0010.01414.80
7.3.50.0050.01014.98
7.3.40.0020.01215.00
7.3.30.0060.00514.89
7.3.20.0110.00516.79
7.3.10.0070.00716.58
7.3.00.0100.00716.65
7.2.330.0110.00716.86
7.2.320.0110.00816.75
7.2.310.0110.00816.82
7.2.300.0070.01016.82
7.2.290.0150.00416.90
7.2.250.0020.01715.10
7.2.240.0080.01115.25
7.2.230.0060.01315.27
7.2.220.0030.01415.15
7.2.210.0070.00715.18
7.2.200.0040.01115.17
7.2.190.0080.00515.11
7.2.180.0050.00815.13
7.2.170.0060.01015.13
7.2.00.0100.00719.20
7.1.330.0070.00915.96
7.1.320.0070.00715.91
7.1.310.0100.00715.77
7.1.300.0110.00315.83
7.1.290.0020.01116.05
7.1.280.0050.00815.76
7.1.270.0050.00615.83
7.1.260.0050.00815.71
7.1.100.0080.00318.28
7.1.70.0000.01117.34
7.1.60.0060.01919.32
7.1.50.0060.01017.14
7.1.00.0070.07322.61
7.0.200.0030.00716.95
7.0.140.0030.07322.32
7.0.60.0300.07020.11
7.0.50.0130.07318.07
7.0.40.0030.04320.27
7.0.30.0500.03720.21
7.0.20.0330.08020.21
7.0.10.0030.05020.24
7.0.00.0200.07720.37
5.6.280.0000.07721.12
5.6.210.0230.07020.71
5.6.200.0070.08318.33
5.6.190.0100.08320.79
5.6.180.0330.04020.61
5.6.170.0300.04320.77
5.6.160.0130.07320.64
5.6.150.0030.08718.27
5.6.140.0000.04718.32
5.6.130.0070.06718.33
5.6.120.0100.08021.05
5.6.110.0100.06721.16
5.6.100.0130.08021.23
5.6.90.0070.04721.16
5.6.80.0030.06020.55
5.5.350.0100.05020.52
5.5.340.0000.04018.13
5.5.330.0070.04020.64
5.5.320.0430.07320.35
5.5.310.0200.05320.57
5.5.300.0100.07318.12
5.5.290.0070.08318.11
5.5.280.0070.06021.00
5.5.270.0130.07720.94
5.5.260.0100.06320.96
5.5.250.0000.08720.75
5.5.240.0170.07720.55
5.4.450.0670.03719.68
5.4.440.0200.06019.73
5.4.430.0870.06019.78
5.4.420.0900.05719.55
5.4.410.0400.04319.69
5.4.400.1000.04319.20
5.4.390.0470.06019.51
5.4.380.0330.05318.95
5.4.370.0300.05018.66
5.4.360.0370.05318.97
5.4.350.0100.06718.90
5.4.340.0300.05718.94
5.4.320.0090.03612.71
5.4.310.0080.03712.70
5.4.300.0050.04312.71
5.4.290.0060.04312.70
5.4.280.0050.03712.61
5.4.270.0080.03412.60
5.4.260.0040.04212.60
5.4.250.0050.03812.61
5.4.240.0070.03512.60
5.4.230.0070.03812.60
5.4.220.0050.03912.59
5.4.210.0080.03412.59
5.4.200.0030.04012.59
5.4.190.0080.03312.59
5.4.180.0060.03612.59
5.4.170.0070.03612.61
5.4.160.0070.03512.61
5.4.150.0070.04312.60
5.4.140.0040.04512.29
5.4.130.0070.03712.27
5.4.120.0110.03212.23
5.4.110.0050.04012.22
5.4.100.0060.03712.23
5.4.90.0060.04012.23
5.4.80.0060.04012.23
5.4.70.0040.03612.22
5.4.60.0060.03912.22
5.4.50.0100.03412.23
5.4.40.0060.03512.21
5.4.30.0050.03712.21
5.4.20.0060.04112.21
5.4.10.0030.03812.21
5.4.00.0060.03611.69
5.3.290.0060.04112.98
5.3.280.0060.04312.91
5.3.270.0100.04212.92
5.3.260.0120.03212.92
5.3.250.0070.04412.92
5.3.240.0060.04812.92
5.3.230.0110.03812.91
5.3.220.0060.03712.88
5.3.210.0050.04212.88
5.3.200.0100.04012.88
5.3.190.0080.03712.88
5.3.180.0090.04112.88
5.3.170.0050.04012.88
5.3.160.0050.04012.88
5.3.150.0060.03712.88
5.3.140.0040.03812.87
5.3.130.0060.03812.86
5.3.120.0060.03812.86
5.3.110.0060.03812.86
5.3.100.0040.03812.34
5.3.90.0070.03512.33
5.3.80.0050.03712.32
5.3.70.0030.03912.32
5.3.60.0080.03312.31
5.3.50.0090.03912.25
5.3.40.0030.03712.25
5.3.30.0030.03612.22
5.3.20.0060.03411.99
5.3.10.0050.03511.96
5.3.00.0060.03511.95
5.2.170.0040.0309.45
5.2.160.0040.0299.45
5.2.150.0070.0389.45
5.2.140.0060.0349.44
5.2.130.0050.0299.40
5.2.120.0030.0349.40
5.2.110.0040.0289.41
5.2.100.0050.0279.41
5.2.90.0040.0369.41
5.2.80.0040.0339.40
5.2.70.0050.0379.40
5.2.60.0050.0299.34
5.2.50.0020.0319.32
5.2.40.0030.0309.29
5.2.30.0060.0289.27
5.2.20.0040.0289.31
5.2.10.0050.0269.23
5.2.00.0040.0379.08
5.1.60.0010.0338.38
5.1.50.0030.0278.37
5.1.40.0050.0258.36
5.1.30.0030.0278.71
5.1.20.0060.0278.72
5.1.10.0030.0278.45
5.1.00.0050.0308.44
5.0.50.0040.0206.93
5.0.40.0040.0186.79
5.0.30.0010.0346.61
5.0.20.0030.0246.58
5.0.10.0010.0226.55
5.0.00.0030.0326.54
4.4.90.0020.0214.77
4.4.80.0060.0174.75
4.4.70.0030.0154.75
4.4.60.0020.0234.75
4.4.50.0000.0184.77
4.4.40.0020.0314.71
4.4.30.0010.0254.75
4.4.20.0010.0204.84
4.4.10.0070.0174.85
4.4.00.0030.0264.76
4.3.110.0040.0144.67
4.3.100.0040.0134.67
4.3.90.0050.0184.63
4.3.80.0060.0224.60
4.3.70.0030.0144.63
4.3.60.0040.0144.63
4.3.50.0010.0204.63
4.3.40.0040.0214.54
4.3.30.0030.0223.35
4.3.20.0010.0173.33
4.3.10.0030.0153.24
4.3.00.0130.01716.39

preferences:
40.99 ms | 401 KiB | 5 Q