3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <a> <b> <c>text</c> </a> XML; $xml = new SimpleXMLElement($string); $result = $xml->xpath('/a/b/c'); foreach ($result as $r) { if (!empty($r)) { print_r((string)$r); } else { //print_r((string)$r); echo 'empty'; } }

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.0140.00417.00
8.3.50.0140.00818.65
8.3.40.0170.00319.34
8.3.30.0110.00419.21
8.3.20.0080.00019.15
8.3.10.0030.00520.91
8.3.00.0090.00017.75
8.2.180.0100.00716.88
8.2.170.0140.00022.96
8.2.160.0040.01122.33
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.95
8.2.110.0060.00321.14
8.2.100.0060.00617.97
8.2.90.0100.00019.34
8.2.80.0040.00418.29
8.2.70.0030.00717.63
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0000.00818.35
8.2.30.0080.00018.39
8.2.20.0040.00417.97
8.2.10.0080.00018.04
8.2.00.0030.00617.88
8.1.280.0080.00825.92
8.1.270.0030.00624.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00721.06
8.1.230.0060.00621.01
8.1.220.0040.00417.77
8.1.210.0060.00319.01
8.1.200.0060.00317.60
8.1.190.0000.00917.91
8.1.180.0080.00018.10
8.1.170.0040.00419.02
8.1.160.0070.00019.11
8.1.150.0000.00718.89
8.1.140.0050.00317.68
8.1.130.0000.00718.02
8.1.120.0000.00717.62
8.1.110.0040.00417.61
8.1.100.0000.00717.59
8.1.90.0000.00717.63
8.1.80.0000.00717.59
8.1.70.0030.00317.55
8.1.60.0000.00817.65
8.1.50.0080.00017.57
8.1.40.0070.00017.72
8.1.30.0000.00817.77
8.1.20.0090.00017.88
8.1.10.0000.00817.89
8.1.00.0000.00717.63
8.0.300.0070.00020.16
8.0.290.0000.00716.88
8.0.280.0030.00318.58
8.0.270.0000.00717.46
8.0.260.0030.00316.90
8.0.250.0030.00517.15
8.0.240.0030.00617.11
8.0.230.0000.00817.14
8.0.220.0000.00717.09
8.0.210.0000.00917.10
8.0.200.0060.00017.25
8.0.190.0040.00417.09
8.0.180.0040.00417.12
8.0.170.0070.00316.99
8.0.160.0080.00017.16
8.0.150.0030.00617.03
8.0.140.0080.00316.98
8.0.130.0000.00513.66
8.0.120.0040.00417.04
8.0.110.0040.00417.07
8.0.100.0070.00016.89
8.0.90.0000.00717.05
8.0.80.0100.01017.18
8.0.70.0030.00517.00
8.0.60.0000.00817.09
8.0.50.0070.00016.94
8.0.30.0090.01117.14
8.0.20.0110.01117.37
8.0.10.0040.00417.25
8.0.00.0100.01117.16
7.4.330.0030.00213.19
7.4.320.0000.00716.75
7.4.300.0000.00616.70
7.4.290.0040.00416.84
7.4.280.0090.00016.79
7.4.270.0030.00616.71
7.4.260.0000.00513.49
7.4.250.0030.00516.86
7.4.240.0000.00716.76
7.4.230.0040.00416.71
7.4.220.0120.00916.80
7.4.210.0090.01016.79
7.4.200.0030.00316.77
7.4.190.0000.00716.69
7.4.160.0080.00816.76
7.4.150.0090.00916.70
7.4.140.0110.00716.83
7.4.130.0140.00416.65
7.4.120.0110.00616.80
7.4.110.0160.00316.71
7.4.100.0060.01216.68
7.4.90.0030.01516.77
7.4.80.0110.00716.71
7.4.70.0110.00716.54
7.4.60.0130.00316.59
7.4.50.0030.00316.53
7.4.40.0060.01016.70
7.4.30.0060.01016.93
7.4.00.0070.01015.30
7.3.330.0030.00313.53
7.3.320.0000.00613.48
7.3.310.0070.00016.36
7.3.300.0000.00716.48
7.3.290.0090.00916.54
7.3.280.0060.01016.49
7.3.270.0070.01116.70
7.3.260.0080.01016.65
7.3.250.0090.01116.76
7.3.240.0070.01416.48
7.3.230.0070.01016.42
7.3.210.0040.01316.56
7.3.200.0080.00819.39
7.3.190.0060.01316.62
7.3.180.0080.00816.66
7.3.170.0100.00716.68
7.3.160.0070.01116.77
7.3.120.0000.01615.15
7.2.330.0120.00616.68
7.2.320.0100.01016.61
7.2.310.0090.01516.82
7.2.300.0000.01616.69
7.2.290.0140.00616.64
7.2.60.0130.00017.00
7.2.00.0060.00319.26
7.1.200.0000.01215.71
7.1.100.0000.01617.77
7.1.70.0000.00817.23
7.1.60.0100.00719.40
7.1.50.0030.01716.97
7.1.00.0000.08022.64
7.0.200.0220.00914.89
7.0.140.0130.06722.17
7.0.120.0070.07322.09
7.0.60.0030.04019.99
7.0.50.0070.05317.99
7.0.40.0130.07720.12
7.0.30.0570.07020.21
7.0.20.0470.07020.42
7.0.10.0000.06320.14
7.0.00.0130.07020.40
5.6.280.0030.07321.16
5.6.210.0200.02720.77
5.6.200.0170.07318.22
5.6.190.0030.06320.55
5.6.180.0130.05020.79
5.6.170.0330.08020.55
5.6.160.0130.07720.70
5.6.150.0070.05318.32
5.6.140.0000.05018.30
5.6.130.0070.06718.40
5.6.120.0070.08021.12
5.6.110.0100.08321.11
5.6.100.0200.05321.00
5.6.90.0030.07020.98
5.6.80.0000.04720.42
5.6.70.2300.04720.47
5.5.350.0100.08320.45
5.5.340.0030.08718.07
5.5.330.0100.08720.29
5.5.320.0270.07720.50
5.5.310.0230.04320.32
5.5.300.0030.08018.15
5.5.290.0000.04318.10
5.5.280.0070.08720.78
5.5.270.0000.09320.93
5.5.260.0100.03720.77
5.5.250.0000.04320.65
5.5.240.0230.03720.40
5.4.450.0070.04319.27
5.4.440.0070.06319.70
5.4.430.0070.08019.40
5.4.420.0100.06019.77
5.4.410.0070.07019.48
5.4.400.0030.07019.35
5.4.390.0030.04019.44
5.4.380.0030.07319.34
5.4.370.0030.05318.99
5.4.360.0100.05318.93
5.4.350.0130.06719.06
5.4.340.0070.06718.93
5.4.320.0130.06019.16
5.4.310.0030.04319.08
5.4.300.0070.05319.19
5.4.290.0130.06719.44
5.4.280.0000.05319.23
5.4.270.0030.04019.44
5.4.260.0100.06719.08
5.4.250.0030.04719.27
5.4.240.0030.08019.38
5.4.230.0030.08019.34
5.4.220.0000.04718.99
5.4.210.0070.04019.27
5.4.200.0030.05318.98
5.4.190.0000.04719.07
5.4.180.0100.07019.24
5.4.170.0100.07018.98
5.4.160.0030.05019.27
5.4.150.0070.03719.06
5.4.140.0070.04016.71
5.4.130.0070.05716.48
5.4.120.0070.03316.68
5.4.110.0030.04716.63
5.4.100.0100.06716.54
5.4.90.0170.05716.58
5.4.80.0070.04016.58
5.4.70.0070.03316.58
5.4.60.0070.03716.53
5.4.50.0100.04016.57
5.4.40.0130.05316.39
5.4.30.0070.04016.53
5.4.20.0100.03716.76
5.4.10.0070.07016.53
5.4.00.0030.06715.98
5.3.290.0100.08014.77
5.3.280.0030.05714.73
5.3.270.0030.07714.63
5.3.260.0070.04314.71
5.3.250.0000.05014.63
5.3.240.0030.05714.79
5.3.230.0000.05014.83
5.3.220.0100.05014.80
5.3.210.0130.05014.70
5.3.200.0000.07714.67
5.3.190.0030.04714.67
5.3.180.0000.06014.61
5.3.170.0130.06314.75
5.3.160.0130.06714.79
5.3.150.0070.05314.66
5.3.140.0100.03014.66
5.3.130.0170.06714.65
5.3.120.0030.04714.65
5.3.110.0030.04714.65
5.3.100.0070.08014.17
5.3.90.0070.05014.10
5.3.80.0030.08014.04
5.3.70.0100.04014.21
5.3.60.0130.07014.14
5.3.50.0000.07714.14
5.3.40.0030.05313.99
5.3.30.0070.06714.11
5.3.20.0030.07013.80
5.3.10.0030.04013.83
5.3.00.0100.06713.89
5.2.170.0100.06011.19
5.2.160.0000.04711.16
5.2.150.0030.04311.13
5.2.140.0030.04711.25
5.2.130.0070.04711.12
5.2.120.0000.05311.30
5.2.110.0130.05011.33
5.2.100.0030.05711.33
5.2.90.0100.02711.34
5.2.80.0030.05011.24
5.2.70.0070.02711.22
5.2.60.0000.04311.04
5.2.50.0000.04011.11
5.2.40.0100.05311.15
5.2.30.0030.04711.20
5.2.20.0070.04711.06
5.2.10.0070.06011.07
5.2.00.0070.04310.90
5.1.60.0030.05710.08
5.1.50.0000.04710.07
5.1.40.0030.02310.10
5.1.30.0000.03010.41
5.1.20.0030.03010.37
5.1.10.0000.02710.18
5.1.00.0000.03010.18
5.0.50.0030.0278.70
5.0.40.0000.0408.63
5.0.30.0000.0378.44
5.0.20.0100.0178.32
5.0.10.0030.0478.36
5.0.00.0000.0578.33
4.4.90.0130.0207.80
4.4.80.0030.0177.80
4.4.70.0030.0337.80
4.4.60.0070.0337.80
4.4.50.0000.0407.80
4.4.40.0000.0277.80
4.4.30.0000.0237.80
4.4.20.0070.0107.80
4.4.10.0030.0307.80
4.4.00.0000.0277.80
4.3.110.0000.0307.80
4.3.100.0000.0207.80
4.3.90.0000.0207.80
4.3.80.0030.0407.80
4.3.70.0070.0277.80
4.3.60.0100.0207.80
4.3.50.0070.0337.80
4.3.40.0000.0537.80
4.3.30.0000.0307.80
4.3.20.0000.0277.80
4.3.10.0000.0207.80
4.3.00.0000.0207.80

preferences:
37.36 ms | 401 KiB | 5 Q