3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <ns1:Root xmlns:ns1="http://example.com/custom"> <ns1:Node>There's stuff here</ns1:Node> </ns1:Root> XML; $simplexml = simplexml_load_string($xml); // This prints "Parse Error". echo ($simplexml ? 'Valid XML' : 'Parse Error'), PHP_EOL; // But this prints "There's stuff here", proving that // the SimpleXML object was created successfully. echo $simplexml->children('http://example.com/custom')->Node, PHP_EOL; // The documentation should instruct us to use this instead: echo ($simplexml !== FALSE ? 'Valid XML' : 'Parse Error'), 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.3.60.0100.00716.63
8.3.50.0160.00621.33
8.3.40.0070.00718.71
8.3.30.0110.00419.29
8.3.20.0000.00820.44
8.3.10.0050.00321.98
8.3.00.0080.00317.75
8.2.180.0040.01416.38
8.2.170.0070.00719.00
8.2.160.0030.01322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.61
8.2.110.0100.00019.55
8.2.100.0060.00617.84
8.2.90.0050.00317.88
8.2.80.0040.00418.98
8.2.70.0090.00017.75
8.2.60.0030.00517.88
8.2.50.0050.00317.63
8.2.40.0040.00419.43
8.2.30.0000.00718.33
8.2.20.0040.00417.91
8.2.10.0040.00418.31
8.2.00.0000.00817.96
8.1.280.0100.01025.92
8.1.270.0060.00320.45
8.1.260.0020.00526.35
8.1.250.0000.00728.09
8.1.240.0030.00719.46
8.1.230.0110.00018.06
8.1.220.0090.00017.91
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0060.00317.25
8.1.180.0030.00518.10
8.1.170.0040.00417.75
8.1.160.0000.00722.11
8.1.150.0070.00019.05
8.1.140.0000.00817.54
8.1.130.0000.00718.03
8.1.120.0000.00817.48
8.1.110.0030.00617.50
8.1.100.0070.00017.59
8.1.90.0040.00417.62
8.1.80.0070.00017.47
8.1.70.0040.00417.60
8.1.60.0000.00917.62
8.1.50.0000.00817.64
8.1.40.0000.00817.58
8.1.30.0050.00317.65
8.1.20.0000.00817.69
8.1.10.0080.00017.52
8.1.00.0000.00817.66
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00818.58
8.0.270.0000.00816.98
8.0.260.0030.00317.45
8.0.250.0040.00417.23
8.0.240.0000.00817.09
8.0.230.0080.00017.14
8.0.220.0030.00317.09
8.0.210.0030.00317.04
8.0.200.0030.00617.02
8.0.190.0000.00717.08
8.0.180.0040.00417.16
8.0.170.0050.00217.13
8.0.160.0050.00217.00
8.0.150.0080.00017.11
8.0.140.0050.00217.08
8.0.130.0030.00313.53
8.0.120.0040.00417.06
8.0.110.0050.00216.99
8.0.100.0040.00417.18
8.0.90.0050.00317.11
8.0.80.0060.01217.04
8.0.70.0030.00516.98
8.0.60.0040.00417.02
8.0.50.0080.00017.05
8.0.30.0150.00917.33
8.0.20.0120.01217.40
8.0.10.0000.00817.26
8.0.00.0170.00517.13
7.4.330.0000.00715.03
7.4.320.0070.00016.76
7.4.300.0030.00316.59
7.4.290.0030.00316.80
7.4.280.0030.00316.79
7.4.270.0000.00716.56
7.4.260.0070.00016.64
7.4.250.0040.00416.66
7.4.240.0020.00516.72
7.4.230.0030.00316.56
7.4.220.0090.00916.77
7.4.210.0080.00916.85
7.4.200.0040.00416.81
7.4.160.0100.00616.77
7.4.150.0000.01717.40
7.4.140.0140.00817.86
7.4.130.0110.01016.69
7.4.120.0060.01016.67
7.4.110.0100.01016.73
7.4.100.0180.00616.82
7.4.90.0100.00616.54
7.4.80.0070.01019.39
7.4.70.0070.01016.73
7.4.60.0040.01216.65
7.4.50.0000.00816.71
7.4.40.0070.01016.64
7.4.30.0110.01116.68
7.4.00.0060.01014.96
7.3.330.0060.00013.37
7.3.320.0000.01213.27
7.3.310.0030.00316.29
7.3.300.0000.00716.43
7.3.290.0070.00016.43
7.3.280.0110.00716.48
7.3.270.0060.01217.40
7.3.260.0090.01216.64
7.3.250.0100.00816.59
7.3.240.0070.01016.64
7.3.230.0030.01616.61
7.3.210.0090.00916.43
7.3.200.0030.01319.39
7.3.190.0090.00816.46
7.3.180.0120.00616.49
7.3.170.0090.00916.70
7.3.160.0030.01216.46
7.2.330.0110.01116.93
7.2.320.0170.00716.80
7.2.310.0130.00316.59
7.2.300.0070.01016.96
7.2.290.0120.00616.73
7.2.60.0000.01516.65
7.2.00.0090.00319.13
7.1.200.0000.01315.68
7.1.100.0030.01018.29
7.1.70.0000.00817.14
7.1.60.0100.01319.50
7.1.50.0060.01617.05
7.1.00.0030.07722.41
7.0.200.0390.01515.12
7.0.140.0030.06022.14
7.0.60.0030.06020.10
7.0.50.0000.09017.95
7.0.40.0000.04720.43
7.0.30.0430.06020.15
7.0.20.0200.04320.40
7.0.10.0230.07720.27
7.0.00.0000.06020.29
5.6.280.0100.06721.07
5.6.210.0130.04320.55
5.6.200.0070.08018.25
5.6.190.0000.08020.80
5.6.180.0400.07320.43
5.6.170.0400.08320.51
5.6.160.0100.04020.67
5.6.150.0100.07718.25
5.6.140.0000.04318.18
5.6.130.0000.04718.21
5.6.120.0030.05021.12
5.6.110.0100.08321.00
5.6.100.0130.06321.02
5.6.90.0100.08320.99
5.6.80.0170.07320.54
5.6.70.0400.06320.46
5.5.350.0370.07020.42
5.5.340.0030.04718.09
5.5.330.0100.04020.43
5.5.320.0130.04320.30
5.5.310.0370.06320.30
5.5.300.0170.07018.04
5.5.290.0070.07718.05
5.5.280.0100.04320.94
5.5.270.0030.04721.06
5.5.260.0130.07720.74
5.5.250.0030.08320.62
5.5.240.0030.04020.32
5.4.450.0700.05719.55
5.4.440.0170.07719.67
5.4.430.0200.07019.30
5.4.420.0130.05319.50
5.4.410.0130.06319.04
5.4.400.0370.05318.85
5.4.390.1370.05018.53
5.4.380.0370.05318.82
5.4.370.0470.05718.80
5.4.360.0430.06018.77
5.4.350.0570.06318.69
5.4.340.0500.04318.84
5.4.320.0400.05318.57
5.4.310.0300.05018.79
5.4.300.0430.05718.69
5.4.290.0400.04718.69
5.4.280.0400.05718.83
5.4.270.2070.06318.80
5.4.260.0430.06018.84
5.4.250.5500.06718.79
5.4.240.2100.06718.57
5.4.230.1630.06318.75
5.4.220.0370.06718.65
5.4.210.0570.05718.78
5.4.200.0300.05716.79
5.4.190.0470.05318.73
5.4.180.0430.06018.77
5.4.170.3970.05318.82
5.4.160.0630.06318.73
5.4.150.0470.07018.75
5.4.140.0630.06316.38
5.4.130.0470.04716.42
5.4.120.0300.05716.16
5.4.110.0270.05716.17
5.4.100.0430.05016.36
5.4.90.0300.06316.40
5.4.80.0400.05316.37
5.4.70.0230.05016.14
5.4.60.2000.04716.05
5.4.50.0470.04716.38
5.4.40.0430.05016.13
5.4.30.2530.06016.38
5.4.20.0400.05316.32
5.4.10.0530.05016.38
5.4.00.0330.05015.88
5.3.290.0370.08014.67
5.3.280.0270.06714.72
5.3.270.0370.06014.67
5.3.260.0400.06314.61
5.3.250.0430.05014.81
5.3.240.0500.06314.64
5.3.230.0300.06314.69
5.3.220.0330.05714.57
5.3.210.0370.05714.64
5.3.200.0600.06314.57
5.3.190.1800.05714.68
5.3.180.0230.04714.62
5.3.170.0130.08014.62
5.3.160.0330.05014.55
5.3.150.0600.07014.79
5.3.140.1570.06314.58
5.3.130.0400.05314.60
5.3.120.1670.06714.72
5.3.110.0370.05314.54
5.3.100.0330.05714.14
5.3.90.0530.05014.11
5.3.80.0370.05714.04
5.3.70.0400.05714.15
5.3.60.0400.05314.02
5.3.50.0270.05714.09
5.3.40.0330.08014.00
5.3.30.0400.04313.93
5.3.20.0270.05713.82
5.3.10.0630.06313.66
5.3.00.0430.07013.64
5.2.170.0430.04311.13
5.2.160.0270.05011.34
5.2.150.0200.05311.26
5.2.140.1630.05711.12
5.2.130.0270.04311.15
5.2.120.2500.03711.29
5.2.110.0370.03711.27
5.2.100.2270.04011.37
5.2.90.1300.05011.16
5.2.80.1970.05311.40
5.2.70.0300.04311.13
5.2.60.0330.04311.32
5.2.50.0400.03311.12
5.2.40.0270.04711.19
5.2.30.0230.04311.25
5.2.20.2170.05311.14
5.2.10.0430.03711.06
5.2.00.0230.05010.79
5.1.60.0370.03710.25
5.1.50.0300.04010.25
5.1.40.0300.03310.14
5.1.30.0300.03710.63
5.1.20.0230.03710.53
5.1.10.0430.04710.18
5.1.00.0100.05010.34
5.0.50.0130.0338.81
5.0.40.1430.0338.69
5.0.30.0170.0538.48
5.0.20.0170.0338.54
5.0.10.0170.0378.50
5.0.00.0100.0508.51
4.4.90.0100.0235.91
4.4.80.0170.0235.88
4.4.70.0270.0205.92
4.4.60.0200.0275.89
4.4.50.0130.0205.88
4.4.40.0200.0275.93
4.4.30.0100.0235.83
4.4.20.0130.0275.96
4.4.10.0130.0305.95
4.4.00.0100.0475.98
4.3.110.0100.0235.82
4.3.100.0070.0205.84
4.3.90.2500.0235.80
4.3.80.0030.0435.83
4.3.70.0130.0235.92
4.3.60.0130.0275.83
4.3.50.0230.0175.87
4.3.40.0400.0435.84
4.3.30.0070.0305.63
4.3.20.0100.0275.63
4.3.10.0130.0205.63
4.3.00.0030.0236.89

preferences:
49.91 ms | 401 KiB | 5 Q