3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_string = <<<EOX <?xml version="1.0" encoding="UTF-8"?> <gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref"> <gesmes:subject>Reference rates</gesmes:subject> <gesmes:Sender> <gesmes:name>European Central Bank</gesmes:name> </gesmes:Sender> <Cube> <Cube time='2013-08-23'> <Cube currency='USD' rate='1.3355'/> <Cube currency='GBP' rate='0.85910'/> <Cube currency='HUF' rate='298.98'/> </Cube> </Cube> </gesmes:Envelope> EOX; $xml = simplexml_load_string($xml_string); $xml->registerXPathNamespace('c', 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'); $result = $xml->xpath('//c:Cube[@currency="USD"]'); echo $result[0];

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.0150.00618.65
8.3.50.0100.00521.33
8.3.40.0100.00319.13
8.3.30.0070.01019.59
8.3.20.0030.00520.75
8.3.10.0000.00822.48
8.3.00.0070.00022.76
8.2.180.0110.00418.91
8.2.170.0120.00922.96
8.2.160.0140.00719.59
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.01426.16
8.2.120.0080.00020.27
8.2.110.0030.00620.91
8.2.100.0060.00618.04
8.2.90.0000.00818.72
8.2.80.0000.00818.30
8.2.70.0030.00617.88
8.2.60.0000.00818.30
8.2.50.0050.00518.07
8.2.40.0000.00718.53
8.2.30.0020.00518.47
8.2.20.0080.00018.00
8.2.10.0000.00717.97
8.2.00.0080.00318.03
8.1.280.0120.00625.92
8.1.270.0090.00018.95
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.44
8.1.230.0000.01021.22
8.1.220.0060.00318.03
8.1.210.0060.00619.15
8.1.200.0000.01017.61
8.1.190.0040.00417.78
8.1.180.0040.00418.86
8.1.170.0000.00818.83
8.1.160.0040.00422.57
8.1.150.0000.00718.85
8.1.140.0040.00417.68
8.1.130.0070.00018.13
8.1.120.0040.00417.61
8.1.110.0030.00717.64
8.1.100.0070.00017.77
8.1.90.0070.00017.64
8.1.80.0040.00417.82
8.1.70.0000.00717.62
8.1.60.0030.00517.94
8.1.50.0030.00617.91
8.1.40.0000.00817.63
8.1.30.0000.00718.03
8.1.20.0040.00417.92
8.1.10.0040.00418.02
8.1.00.0030.00617.71
8.0.300.0070.00020.34
8.0.290.0040.00417.43
8.0.280.0000.00818.84
8.0.270.0030.00317.55
8.0.260.0050.00317.23
8.0.250.0000.00717.25
8.0.240.0010.01017.20
8.0.230.0000.00717.30
8.0.220.0070.00017.26
8.0.210.0030.00317.27
8.0.200.0000.00717.18
8.0.190.0000.00817.18
8.0.180.0040.00417.16
8.0.170.0030.00617.37
8.0.160.0000.00717.30
8.0.150.0000.00717.25
8.0.140.0040.00417.26
8.0.130.0030.00313.57
8.0.120.0000.00717.31
8.0.110.0040.00417.26
8.0.100.0050.00217.31
8.0.90.0000.00817.20
8.0.80.0090.00617.19
8.0.70.0080.00017.15
8.0.60.0070.00017.03
8.0.50.0050.00317.30
8.0.30.0120.00717.49
8.0.20.0050.01317.66
8.0.10.0040.00417.43
8.0.00.0070.01117.10
7.4.330.0030.00315.00
7.4.320.0030.00316.85
7.4.300.0000.00616.82
7.4.290.0040.00416.86
7.4.280.0030.00816.82
7.4.270.0030.00316.87
7.4.260.0030.00316.91
7.4.250.0040.00416.80
7.4.240.0000.00716.77
7.4.230.0000.00716.72
7.4.220.0060.01016.91
7.4.210.0030.01316.85
7.4.200.0050.00216.87
7.4.190.0040.00416.86
7.4.160.0080.00816.65
7.4.150.0030.01317.40
7.4.140.0130.00517.86
7.4.130.0110.00816.74
7.4.120.0100.00716.88
7.4.110.0060.01116.83
7.4.100.0100.00716.75
7.4.90.0130.00616.85
7.4.80.0090.00919.39
7.4.70.0070.01016.80
7.4.60.0130.00316.72
7.4.50.0030.00316.58
7.4.40.0090.00722.77
7.4.30.0090.00616.70
7.4.00.0040.00815.03
7.3.330.0030.00313.42
7.3.320.0000.00513.41
7.3.310.0030.00316.72
7.3.300.0030.00316.71
7.3.290.0140.00416.61
7.3.280.0080.01016.58
7.3.270.0060.01017.40
7.3.260.0110.00816.77
7.3.250.0060.01116.72
7.3.240.0120.00616.97
7.3.230.0160.00616.79
7.3.210.0060.01516.63
7.3.200.0100.00716.71
7.3.190.0150.00616.70
7.3.180.0000.01516.56
7.3.170.0170.00016.65
7.3.160.0060.00916.74
7.3.120.0070.01115.12
7.2.330.0100.01716.97
7.2.320.0130.01016.84
7.2.310.0060.01016.88
7.2.300.0040.01217.14
7.2.290.0090.01216.65
7.2.00.0060.00918.79
7.1.200.0080.00516.15
7.1.100.0040.00418.48
7.1.70.0080.00317.17
7.1.60.0070.01719.82
7.1.50.0030.01416.74
7.1.00.0030.03322.64
7.0.200.0000.00816.95
7.0.140.0000.07322.40
7.0.60.0030.06720.18
7.0.50.0100.05718.01
7.0.40.0000.05320.28
7.0.30.0330.07320.23
7.0.20.0300.04020.21
7.0.10.0300.06320.45
7.0.00.0070.04320.36
5.6.280.0000.07321.14
5.6.210.0070.08320.72
5.6.200.0070.08018.34
5.6.190.0130.07720.55
5.6.180.3500.03720.75
5.6.170.0270.08020.54
5.6.160.0100.07720.72
5.6.150.0030.09018.39
5.6.140.0070.08018.33
5.6.130.0000.05318.36
5.6.120.0070.09021.11
5.6.110.0000.09021.20
5.6.100.0070.08321.18
5.6.90.0130.06021.18
5.6.80.0130.06720.51
5.6.70.0330.07320.45
5.5.350.0200.08320.52
5.5.340.0000.04018.16
5.5.330.0070.09020.30
5.5.320.0330.06720.52
5.5.310.0270.08320.55
5.5.300.0070.04018.09
5.5.290.0130.07718.13
5.5.280.0070.08720.92
5.5.270.0130.07320.92
5.5.260.0030.05721.15
5.5.250.0030.05020.64
5.5.240.0100.06720.38
5.4.450.0630.06019.61
5.4.440.0830.06319.73
5.4.430.0170.04719.56
5.4.420.0570.06319.56
5.4.410.0670.05319.61
5.4.400.0500.05318.89
5.4.390.0430.06318.77
5.4.380.0100.06718.89
5.4.370.0130.05318.91
5.4.360.0230.04318.67
5.4.350.0090.04612.25
5.4.340.0160.08712.25
5.4.320.0080.03612.75
5.4.310.0100.04212.74
5.4.300.0040.04012.75
5.4.290.0100.03412.73
5.4.280.0100.04012.63
5.4.270.0070.04012.63
5.4.260.0080.03712.63
5.4.250.0100.07318.87
5.4.240.0170.05318.98
5.4.230.0100.05019.03
5.4.220.0200.06319.02
5.4.210.0170.04318.89
5.4.200.0070.05318.98
5.4.190.0030.06019.00
5.4.180.0130.07019.11
5.4.170.0200.04019.14
5.4.160.0170.04718.96
5.4.150.0230.04718.94
5.4.140.0030.07016.73
5.4.130.0230.05016.79
5.4.120.0100.07016.44
5.4.110.0170.06716.46
5.4.100.0130.04016.61
5.4.90.0070.05016.37
5.4.80.0100.06016.48
5.4.70.0200.05316.59
5.4.60.0130.05316.71
5.4.50.0130.06716.75
5.4.40.0000.05716.41
5.4.30.0230.04716.43
5.4.20.0030.06716.46
5.4.10.0130.05316.67
5.4.00.0030.06716.14
5.3.290.0060.03913.00
5.3.280.0030.06014.76
5.3.270.0100.05014.69
5.3.260.0070.07714.71
5.3.250.0070.05014.73
5.3.240.0030.07714.67
5.3.230.0030.07714.77
5.3.220.0170.05314.87
5.3.210.0030.05714.62
5.3.200.0170.05014.87
5.3.190.0130.05714.66
5.3.180.0200.05714.48
5.3.170.0170.06014.66
5.3.160.0100.06714.73
5.3.150.0070.05714.63
5.3.140.0170.05714.47
5.3.130.0130.07014.68
5.3.120.0070.07014.64
5.3.110.0070.06714.64
5.3.100.0130.06714.28
5.3.90.0030.07014.22
5.3.80.0100.04714.06
5.3.70.0000.06014.09
5.3.60.0070.06714.09
5.3.50.0170.05314.19
5.3.40.0000.07714.12
5.3.30.0030.05314.00
5.3.20.0070.05013.79
5.3.10.0100.06713.71
5.3.00.0070.05713.80
5.2.170.0030.04311.11
5.2.160.0130.04311.24
5.2.150.0030.04711.12
5.2.140.0100.03711.35
5.2.130.0070.04311.36
5.2.120.0070.05011.07
5.2.110.0000.05711.16
5.2.100.0030.04711.40
5.2.90.0070.04311.26
5.2.80.0130.05311.34
5.2.70.0070.04011.25
5.2.60.0030.04311.21
5.2.50.0070.04011.10
5.2.40.0000.05711.10
5.2.30.0000.04711.07
5.2.20.0100.05011.17
5.2.10.0070.04711.25
5.2.00.0000.06010.86
5.1.60.0070.03310.12
5.1.50.0030.05010.16
5.1.40.0030.03310.29
5.1.30.0030.05010.57
5.1.20.0070.03710.48
5.1.10.0130.03710.21
5.1.00.0000.05710.32
5.0.50.0030.0278.59
5.0.40.0030.0378.59
5.0.30.0030.0408.46
5.0.20.0030.0278.32
5.0.10.0070.0238.16
5.0.00.0070.0438.36
4.4.90.0030.0307.20
4.4.80.0070.0177.20
4.4.70.0030.0277.20
4.4.60.0030.0207.20
4.4.50.0100.0237.20
4.4.40.0030.0477.20
4.4.30.0070.0237.20
4.4.20.0030.0237.20
4.4.10.0000.0237.20
4.4.00.0000.0337.20
4.3.110.0030.0207.20
4.3.100.0000.0277.20
4.3.90.0070.0237.20
4.3.80.0000.0337.20
4.3.70.0000.0307.20
4.3.60.0000.0237.20
4.3.50.0000.0237.20
4.3.40.0000.0377.20
4.3.30.0000.0237.20
4.3.20.0000.0237.20
4.3.10.0030.0207.20
4.3.00.0100.0236.71

preferences:
39.53 ms | 401 KiB | 5 Q