3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <sizes> <size label="Square" width="75" height="75" /> <size label="Thumbnail" width="100" height="62" /> <size label="Small" width="112" height="69">small</size> <size label="Large" width="112" height="69">large</size> </sizes> XML; $xml = simplexml_load_string($string); $result = $xml->xpath("//size"); // print the first (and only) member of the array var_dump($result);

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.0150.00018.96
8.3.30.0130.00319.02
8.3.20.0040.00420.57
8.3.10.0080.00024.08
8.3.00.0000.00819.63
8.2.170.0060.00919.17
8.2.160.0100.00722.96
8.2.150.0030.00925.66
8.2.140.0090.00024.66
8.2.130.0030.00618.00
8.2.120.0040.00426.35
8.2.110.0060.00320.89
8.2.100.0110.00018.18
8.2.90.0000.00819.42
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0050.00318.18
8.2.50.0100.00518.07
8.2.40.0080.00019.63
8.2.30.0040.00420.93
8.2.20.0000.01017.92
8.2.10.0040.00418.38
8.2.00.0040.00418.38
8.1.270.0090.00024.21
8.1.260.0070.00028.09
8.1.250.0060.00328.09
8.1.240.0030.00624.21
8.1.230.0120.00018.04
8.1.220.0000.00818.01
8.1.210.0060.00318.77
8.1.200.0040.00417.60
8.1.190.0040.00418.02
8.1.180.0080.00018.10
8.1.170.0030.00618.82
8.1.160.0040.00422.36
8.1.150.0050.00219.26
8.1.140.0080.00019.89
8.1.130.0040.00418.02
8.1.120.0030.00617.75
8.1.110.0000.00717.82
8.1.100.0040.00417.85
8.1.90.0050.00217.73
8.1.80.0000.00817.60
8.1.70.0000.00817.75
8.1.60.0040.00417.95
8.1.50.0030.00517.77
8.1.40.0000.00717.70
8.1.30.0000.00818.02
8.1.20.0000.00817.89
8.1.10.0040.00417.84
8.1.00.0040.00417.84
8.0.300.0090.00018.77
8.0.290.0060.00317.13
8.0.280.0040.00418.72
8.0.270.0000.00717.51
8.0.260.0000.00917.52
8.0.250.0030.00317.32
8.0.240.0000.00717.42
8.0.230.0080.00017.27
8.0.220.0080.00017.12
8.0.210.0040.00417.31
8.0.200.0030.00317.16
8.0.190.0040.00417.40
8.0.180.0000.00717.14
8.0.170.0040.00417.16
8.0.160.0000.00817.10
8.0.150.0110.00017.09
8.0.140.0000.00717.03
8.0.130.0000.00613.71
8.0.120.0060.00317.32
8.0.110.0050.00217.03
8.0.100.0040.00417.21
8.0.90.0040.00417.27
8.0.80.0140.00417.23
8.0.70.0040.00417.20
8.0.60.0020.00517.35
8.0.50.0040.00417.19
8.0.30.0100.00917.31
8.0.20.0160.01717.59
8.0.10.0040.00417.36
8.0.00.0140.00417.03
7.4.330.0030.00317.26
7.4.320.0030.00316.88
7.4.300.0040.00416.92
7.4.290.0030.00316.76
7.4.280.0040.00416.74
7.4.270.0030.00316.90
7.4.260.0070.00316.71
7.4.250.0040.00416.83
7.4.240.0030.00416.78
7.4.230.0070.00016.84
7.4.220.0130.01316.91
7.4.210.0130.00916.87
7.4.200.0040.00416.89
7.4.160.0050.01116.89
7.4.150.0100.01017.40
7.4.140.0150.00617.86
7.4.130.0120.00716.98
7.4.120.0140.00716.80
7.4.110.0260.00016.79
7.4.100.0160.00716.62
7.4.90.0130.00716.84
7.4.80.0000.01819.39
7.4.70.0100.00716.79
7.4.60.0100.01016.91
7.4.50.0040.01116.79
7.4.40.0110.00616.95
7.4.30.0090.00916.85
7.4.10.0060.00615.03
7.4.00.0080.00914.82
7.3.330.0030.00413.35
7.3.320.0050.00013.41
7.3.310.0000.00816.69
7.3.300.0000.00716.44
7.3.290.0080.00716.61
7.3.280.0110.00916.57
7.3.270.0120.00817.40
7.3.260.0070.01116.83
7.3.250.0090.01016.68
7.3.240.0080.01216.54
7.3.230.0120.00616.67
7.3.210.0090.00916.68
7.3.200.0130.00516.95
7.3.190.0150.00616.82
7.3.180.0070.01016.70
7.3.170.0110.00616.61
7.3.160.0120.00616.76
7.3.130.0140.00314.86
7.3.120.0030.01014.84
7.3.110.0040.01514.93
7.3.100.0130.00014.86
7.3.90.0040.01515.00
7.3.80.0000.01414.82
7.3.70.0080.00814.90
7.3.60.0070.00714.92
7.3.50.0030.00914.65
7.3.40.0070.00414.64
7.3.30.0030.01114.95
7.3.20.0040.00716.72
7.3.10.0090.00416.69
7.3.00.0060.00616.84
7.2.330.0090.00916.55
7.2.320.0030.01616.90
7.2.310.0170.00316.93
7.2.300.0170.00017.09
7.2.290.0110.01116.76
7.2.260.0030.01415.30
7.2.250.0160.00015.09
7.2.240.0080.00614.82
7.2.230.0120.00315.04
7.2.220.0100.00715.14
7.2.210.0030.00715.05
7.2.200.0070.00714.80
7.2.190.0120.00315.15
7.2.180.0040.00815.25
7.2.170.0090.00614.97
7.2.160.0000.01614.91
7.2.150.0060.00617.03
7.2.140.0060.00316.91
7.2.130.0030.01516.86
7.2.120.0100.00716.86
7.2.110.0030.01016.86
7.2.100.0060.00316.99
7.2.90.0070.00716.95
7.2.80.0030.00616.76
7.2.70.0030.01016.96
7.2.60.0050.00916.90
7.2.50.0060.00317.01
7.2.40.0040.00716.89
7.2.30.0070.00316.98
7.2.20.0070.00717.04
7.2.10.0110.00716.90
7.2.00.0070.00918.29
7.1.330.0000.01415.98
7.1.320.0080.00415.95
7.1.310.0030.00615.91
7.1.300.0070.00716.02
7.1.290.0040.00715.89
7.1.280.0080.00815.82
7.1.270.0040.01115.77
7.1.260.0030.00615.83
7.1.250.0000.01415.68
7.1.240.0140.00016.00
7.1.230.0070.00715.86
7.1.220.0060.00316.14
7.1.210.0050.00815.74
7.1.200.0080.00515.69
7.1.190.0030.00716.12
7.1.180.0030.01015.95
7.1.170.0000.01215.91
7.1.160.0040.00715.94
7.1.150.0000.00915.67
7.1.140.0040.00415.77
7.1.130.0040.01115.98
7.1.120.0040.00715.73
7.1.110.0000.01215.90
7.1.100.0050.00616.84
7.1.90.0070.00715.64
7.1.80.0060.00616.06
7.1.70.0020.00916.58
7.1.60.0050.01017.62
7.1.50.0070.00916.33
7.1.40.0110.00415.81
7.1.30.0080.00315.78
7.1.20.0000.01215.78
7.1.10.0060.00615.75
7.1.00.0020.04519.19
7.0.330.0030.01015.57
7.0.320.0140.00015.49
7.0.310.0040.00415.47
7.0.300.0060.00615.67
7.0.290.0070.00415.49
7.0.280.0040.00715.79
7.0.270.0000.00815.52
7.0.260.0000.01515.50
7.0.250.0030.00615.57
7.0.240.0030.01015.60
7.0.230.0000.01115.63
7.0.220.0070.01015.67
7.0.210.0110.00015.67
7.0.200.0030.00716.14
7.0.190.0060.00315.60
7.0.180.0070.00715.54
7.0.170.0030.00915.63
7.0.160.0030.00615.57
7.0.150.0070.00715.46
7.0.140.0100.00315.45
7.0.130.0000.01415.65
7.0.120.0080.00015.75
7.0.110.0060.00615.59
7.0.100.0030.00915.71
7.0.90.0060.00615.63
7.0.80.0090.00615.54
7.0.70.0030.01015.52
7.0.60.0020.02517.81
7.0.50.0000.05216.81
7.0.40.0080.02717.04
7.0.30.0190.04217.04
7.0.20.0070.02716.92
7.0.10.0070.03516.98
7.0.00.0080.04016.89
5.6.400.0090.00314.50
5.6.390.0030.01014.41
5.6.380.0070.00714.36
5.6.370.0000.01014.63
5.6.360.0120.00314.44
5.6.350.0070.00714.46
5.6.340.0040.01114.63
5.6.330.0070.00414.48
5.6.320.0090.00314.52
5.6.310.0060.00614.40
5.6.300.0130.00014.23
5.6.290.0000.00814.33
5.6.280.0080.02317.94
5.6.270.0060.00614.49
5.6.260.0000.01414.45
5.6.250.0110.00414.40
5.6.240.0040.00414.38
5.6.230.0030.01214.24
5.6.220.0050.00514.44
5.6.210.0080.04317.84
5.6.200.0110.04016.47
5.6.190.0090.03117.37
5.6.180.0210.02817.50
5.6.170.0130.04517.61
5.6.160.0070.03217.57
5.6.150.0070.03416.39
5.6.140.0060.03316.29
5.6.130.0060.02816.41
5.6.120.0120.04017.78
5.6.110.0070.03417.83
5.6.100.0020.04017.91
5.6.90.0050.03417.72
5.6.80.0050.04517.44
5.6.70.0090.00914.25
5.6.60.0070.00714.71
5.6.50.0030.01014.21
5.6.40.0040.00414.21
5.6.30.0000.01614.19
5.6.20.0090.00614.39
5.6.10.0000.00814.36
5.6.00.0000.01114.58
5.5.380.0000.00814.56
5.5.370.0130.00314.23
5.5.360.0030.00614.28
5.5.350.0150.04217.58
5.5.340.0060.02916.42
5.5.330.0080.03317.24
5.5.320.0180.03217.48
5.5.310.0130.02317.36
5.5.300.0000.03416.28
5.5.290.0040.02516.22
5.5.280.0120.04017.56
5.5.270.0090.04217.79
5.5.260.0100.03717.56
5.5.250.0050.03317.45
5.5.240.0200.03717.21
5.5.230.0040.01514.13
5.5.220.0110.00414.38
5.5.210.0150.00014.32
5.5.200.0030.00914.04
5.5.190.0090.00614.40
5.5.180.0060.01014.41
5.5.170.0070.00414.09
5.5.160.0030.00714.22
5.5.150.0070.00714.44
5.5.140.0000.01413.99
5.5.130.0080.00514.51
5.5.120.0030.00614.16
5.5.110.0030.01014.35
5.5.100.0080.00314.04
5.5.90.0030.01214.25
5.5.80.0060.00614.34
5.5.70.0030.01014.29
5.5.60.0100.00314.35
5.5.50.0000.01314.36
5.5.40.0000.01114.34
5.5.30.0090.00014.43
5.5.20.0070.00414.33
5.5.10.0080.00814.25
5.5.00.0000.01514.03

preferences:
46.09 ms | 400 KiB | 5 Q