3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<?xml version="1.0" encoding="UTF-8"?> <foo> <bar> <name>Frank</name> </bar> </foo>'; $xml = new SimpleXMLElement($str); $results = $xml->xpath("//foo/bar/name"); $first_result = $results[0]; var_dump( (string)$first_result ); var_dump( $first_result->asXML() );

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.130.0000.00916.99
8.3.120.0000.01019.23
8.3.110.0120.00920.94
8.3.100.0030.00624.06
8.3.90.0050.00326.77
8.3.80.0040.00817.97
8.3.70.0170.00318.53
8.3.60.0140.00718.68
8.3.50.0050.00916.88
8.3.40.0080.01118.99
8.3.30.0090.00619.14
8.3.20.0070.00022.23
8.3.10.0080.00024.04
8.3.00.0050.00320.17
8.2.250.0040.00417.17
8.2.240.0050.00517.65
8.2.230.0060.01322.58
8.2.220.0080.00037.54
8.2.210.0080.00026.77
8.2.200.0060.00318.66
8.2.190.0040.01116.94
8.2.180.0090.00618.66
8.2.170.0070.01122.96
8.2.160.0040.01420.85
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00820.63
8.2.120.0000.00726.35
8.2.110.0060.00321.30
8.2.100.0000.01117.97
8.2.90.0060.00320.15
8.2.80.0060.00318.00
8.2.70.0060.00317.88
8.2.60.0040.00418.30
8.2.50.0040.00418.07
8.2.40.0040.00418.54
8.2.30.0040.00418.42
8.2.20.0000.00818.52
8.2.10.0000.00817.98
8.2.00.0000.00718.34
8.1.300.0080.01119.08
8.1.290.0090.00030.84
8.1.280.0070.00725.92
8.1.270.0040.00424.11
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0030.00624.17
8.1.230.0080.00321.28
8.1.220.0080.00017.91
8.1.210.0000.00919.20
8.1.200.0060.00317.73
8.1.190.0040.00417.61
8.1.180.0030.00518.10
8.1.170.0050.00318.83
8.1.160.0040.00419.17
8.1.150.0040.00420.63
8.1.140.0040.00417.94
8.1.130.0030.00519.34
8.1.120.0000.00717.61
8.1.110.0040.00417.79
8.1.100.0080.00017.81
8.1.90.0040.00317.75
8.1.80.0040.00417.61
8.1.70.0000.01017.93
8.1.60.0050.00317.98
8.1.50.0050.00317.92
8.1.40.0000.00717.91
8.1.30.0070.00318.00
8.1.20.0040.00418.02
8.1.10.0000.00717.74
8.1.00.0060.00317.88
8.0.300.0070.00020.29
8.0.290.0030.00717.00
8.0.280.0070.00018.66
8.0.270.0090.00018.81
8.0.260.0040.00417.11
8.0.250.0030.00717.30
8.0.240.0040.00417.12
8.0.230.0030.00317.26
8.0.220.0000.00817.11
8.0.210.0080.00017.18
8.0.200.0000.00717.27
8.0.190.0000.00717.10
8.0.180.0000.00817.27
8.0.170.0040.00417.15
8.0.160.0000.00717.30
8.0.150.0070.00017.02
8.0.140.0000.00717.20
8.0.130.0000.00713.66
8.0.120.0030.00916.97
8.0.110.0000.00817.28
8.0.100.0040.00417.14
8.0.90.0040.00417.10
8.0.80.0070.01017.17
8.0.70.0040.00417.16
8.0.60.0040.00417.16
8.0.50.0000.00717.06
8.0.30.0110.00817.36
8.0.20.0140.01017.57
8.0.10.0070.00017.21
8.0.00.0090.01217.15
7.4.330.0020.00215.55
7.4.320.0000.00716.88
7.4.300.0030.00317.03
7.4.290.0070.00016.82
7.4.280.0040.00416.90
7.4.270.0000.00716.91
7.4.260.0000.00716.95
7.4.250.0000.00716.64
7.4.240.0030.00316.90
7.4.230.0040.00416.99
7.4.220.0030.00517.01
7.4.210.0080.00816.93
7.4.200.0000.00716.75
7.4.160.0110.00716.81
7.4.140.0110.01117.86
7.4.130.0140.01016.84
7.4.120.0090.01016.92
7.4.110.0070.01016.72
7.4.100.0070.01016.84
7.4.90.0170.00016.91
7.4.80.0030.01319.39
7.4.70.0100.00716.77
7.4.60.0030.01316.92
7.4.50.0030.01016.85
7.4.40.0090.01517.07
7.4.30.0130.01016.90
7.4.20.0090.01316.72
7.4.10.0060.01016.08
7.4.00.0050.01216.04
7.3.330.0030.00313.54
7.3.320.0060.00013.39
7.3.310.0070.00016.74
7.3.300.0030.00316.51
7.3.290.0060.00916.69
7.3.280.0070.00916.68
7.3.260.0140.00616.74
7.3.240.0100.00716.71
7.3.230.0120.00916.68
7.3.210.0070.01016.66
7.3.200.0100.00716.63
7.3.190.0030.01416.83
7.3.180.0130.00316.62
7.3.170.0030.01216.73
7.3.160.0090.00916.89
7.3.150.0150.00816.90
7.3.140.0170.00316.62
7.3.130.0080.01116.15
7.3.120.0080.00916.04
7.3.110.0040.01516.21
7.3.100.0050.01216.01
7.3.90.0090.00716.19
7.3.80.0090.00716.05
7.3.70.0050.01016.08
7.3.60.0060.01016.01
7.3.50.0060.01116.02
7.3.40.0090.00716.14
7.3.30.0060.01016.01
7.3.20.0100.00617.09
7.3.10.0060.01017.20
7.3.00.0050.01117.21
7.2.330.0150.00917.16
7.2.320.0070.01016.88
7.2.310.0100.00716.60
7.2.300.0130.00716.59
7.2.290.0030.02117.01
7.2.280.0140.00717.10
7.2.270.0090.00916.93
7.2.260.0070.01216.25
7.2.250.0090.01116.44
7.2.240.0080.00816.30
7.2.230.0050.01016.28
7.2.220.0070.00916.21
7.2.210.0060.00916.25
7.2.200.0100.00616.34
7.2.190.0100.00816.31
7.2.180.0060.01016.16
7.2.170.0060.01116.18
7.2.160.0080.00916.18
7.2.150.0070.01017.47
7.2.140.0120.00517.42
7.2.130.0060.00917.48
7.2.120.0080.00917.47
7.2.110.0100.00717.68
7.2.100.0080.00817.61
7.2.90.0130.00917.47
7.2.80.0100.00817.45
7.2.70.0090.01017.54
7.2.60.0090.00717.42
7.2.50.0080.00917.44
7.2.40.0060.01117.48
7.2.30.0080.01217.46
7.2.20.0070.01017.69
7.2.10.0240.01217.49
7.2.00.0090.01217.43
7.1.330.0070.00716.38
7.1.320.0060.01116.39
7.1.310.0040.01016.42
7.1.300.0090.01116.49
7.1.290.0070.00616.58
7.1.280.0060.00816.44
7.1.270.0080.01116.42
7.1.260.0070.00816.45
7.1.250.0080.00916.38
7.1.240.0080.00816.52
7.1.230.0100.00816.32
7.1.220.0070.00816.45
7.1.210.0120.00616.40
7.1.200.0080.00816.30
7.1.190.0080.01016.43
7.1.180.0080.01016.47
7.1.170.0090.01016.35
7.1.160.0080.00816.50
7.1.150.0110.00816.54
7.1.140.0110.01016.66
7.1.130.0080.00816.53
7.1.120.0130.00916.72
7.1.110.0110.00916.48
7.1.100.0120.00716.28
7.1.90.0080.00816.35
7.1.80.0100.00816.49
7.1.70.0080.01116.12
7.1.60.0140.00820.71
7.1.50.0140.01020.69
7.1.40.0130.00820.59
7.1.30.0150.00820.59
7.1.20.0130.01120.63
7.1.10.0080.01116.07
7.1.00.0070.01116.11
7.0.330.0080.01016.01
7.0.320.0060.01116.10
7.0.310.0080.00816.06
7.0.300.0100.00716.07
7.0.290.0080.00816.03
7.0.280.0060.00916.03
7.0.270.0090.00816.11
7.0.260.0080.00816.11
7.0.250.0060.01116.11
7.0.240.0100.00716.18
7.0.230.0070.01015.99
7.0.220.0110.00715.95
7.0.210.0080.00816.07
7.0.200.0080.00616.20
7.0.190.0030.01116.17
7.0.180.0060.00816.26
7.0.170.0070.00516.17
7.0.160.0090.00716.28
7.0.150.0090.00815.97
7.0.140.0080.00816.13
7.0.130.0030.01216.12
7.0.120.0080.01116.19
7.0.110.0060.01116.11
7.0.100.0080.00716.09
7.0.90.0050.01016.07
7.0.80.0070.00716.08
7.0.70.0060.01116.10
7.0.60.0040.01016.11
7.0.50.0090.00516.19
7.0.40.0070.00614.77
7.0.30.0040.01014.69
7.0.20.0070.00914.71
7.0.10.0080.00714.68
7.0.00.0090.01014.74
5.6.400.0050.01115.77
5.6.390.0100.01015.50
5.6.380.0100.00615.56
5.6.370.0080.01115.77
5.6.360.0070.01315.58
5.6.350.0070.01015.70
5.6.340.0070.01415.66
5.6.330.0100.01015.68
5.6.320.0110.01015.80
5.6.310.0070.01015.67
5.6.300.0050.00915.72
5.6.290.0060.01115.55
5.6.280.0090.00815.70
5.6.270.0080.00915.61
5.6.260.0060.00915.62
5.6.250.0080.00815.52
5.6.240.0050.01115.71
5.6.230.0070.00815.58
5.6.220.0070.00915.60
5.6.210.0050.01215.56
5.6.200.0070.00615.68
5.6.190.0080.01215.76
5.6.180.0100.00815.83
5.6.170.0100.00615.52
5.6.160.0070.01115.73
5.6.150.0070.00715.72
5.6.140.0070.00715.63
5.6.130.0070.01015.58
5.6.120.0060.01115.69
5.6.110.0040.01115.51
5.6.100.0120.00715.76
5.6.90.0070.00915.51
5.6.80.0090.01015.49
5.6.70.0090.00715.42
5.6.60.0060.01215.60
5.6.50.0050.01515.66
5.6.40.0070.01015.51
5.6.30.0070.00915.39
5.6.20.0110.00815.54
5.6.10.0050.01515.55
5.6.00.0080.01215.67

preferences:
30.02 ms | 403 KiB | 5 Q