3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_string = '<?xml version="1.0" encoding="utf-8"?> <livraria> <livro categoria="cozinha"> <titulo lang="en">Everyday Italian</titulo> <autor>Giada De Laurentiis</autor> <ano>2005</ano> <preco>30.00</preco> </livro> <livro categoria="juvenil"> <titulo lang="pt">Harry Potter e o Cálice de Fogo</titulo> <autor>J. K. Rowling</autor> <ano>2005</ano> <preco>29.99</preco> </livro> <livro categoria="web"> <titulo lang="en">Learning XML</titulo> <autor>Erik T. Ray</autor> <ano>2003</ano> <preco>39.95</preco> </livro> <livro categoria="ficcao"> <titulo lang="pt">Guia do Mochileiro das Galáxias, O</titulo> <autor>Douglas Adams</autor> <ano>1979</ano> <preco>19.95</preco> </livro> </livraria>'; $livraria = new SimpleXMLElement($xml_string); ?> <?php foreach($livraria->children() as $livro) :?> <ul> <li> <?=$livro->getName()?> <?php foreach($livro->attributes() as $attr) :?> <ul> <li> <?=$attr->getName() . " : " . $attr ?> <ul> <?php foreach($livro->children() as $item) :?> <li><?=$item->getName() . " : " . $item ?></li> <?php endforeach; ?> </ul> </li> </ul> <?php endforeach; ?> </li> </ul> <?php endforeach; ?>

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.0090.00616.63
8.3.50.0160.00422.25
8.3.40.0120.00318.87
8.3.30.0070.00719.21
8.3.20.0040.00420.34
8.3.10.0040.00422.02
8.3.00.0040.00419.63
8.2.180.0080.00818.41
8.2.170.0080.00822.96
8.2.160.0130.00720.48
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.32
8.2.110.0060.00322.33
8.2.100.0040.00817.95
8.2.90.0030.00619.47
8.2.80.0040.00418.18
8.2.70.0040.00417.75
8.2.60.0030.00618.05
8.2.50.0040.00418.07
8.2.40.0050.00318.47
8.2.30.0040.00418.17
8.2.20.0040.00417.87
8.2.10.0030.00520.06
8.2.00.0100.00018.03
8.1.280.0070.01425.92
8.1.270.0000.00824.21
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0000.01024.00
8.1.230.0110.00019.22
8.1.220.0030.00517.91
8.1.210.0030.00518.77
8.1.200.0070.00317.60
8.1.190.0080.00017.66
8.1.180.0000.00818.10
8.1.170.0000.00818.74
8.1.160.0050.00322.13
8.1.150.0040.00418.88
8.1.140.0000.00717.60
8.1.130.0070.00018.08
8.1.120.0030.00517.62
8.1.110.0000.00817.56
8.1.100.0000.00817.60
8.1.90.0040.00417.60
8.1.80.0090.00017.75
8.1.70.0040.00417.54
8.1.60.0050.00317.73
8.1.50.0040.00417.77
8.1.40.0000.00817.80
8.1.30.0040.00417.89
8.1.20.0060.00317.93
8.1.10.0040.00417.70
8.1.00.0040.00417.71
8.0.300.0060.00318.77
8.0.290.0030.00717.43
8.0.280.0050.00318.71
8.0.270.0000.00717.48
8.0.260.0030.00317.48
8.0.250.0030.00517.25
8.0.240.0000.00817.13
8.0.230.0000.00717.27
8.0.220.0040.00417.11
8.0.210.0000.00717.01
8.0.200.0040.00417.04
8.0.190.0000.00917.09
8.0.180.0000.00717.15
8.0.170.0060.00317.22
8.0.160.0000.00716.99
8.0.150.0070.00017.05
8.0.140.0000.00816.96
8.0.130.0000.00613.55
8.0.120.0000.00817.04
8.0.110.0050.00217.04
8.0.100.0040.00417.04
8.0.90.0040.00417.03
8.0.80.0040.01117.04
8.0.70.0000.00817.16
8.0.60.0000.00817.03
8.0.50.0000.00716.86
8.0.30.0140.00917.57
8.0.20.0140.00617.40
8.0.10.0030.00517.07
8.0.00.0100.01216.98
7.4.330.0030.00315.00
7.4.320.0000.00716.75
7.4.300.0000.00716.95
7.4.290.0080.00016.66
7.4.280.0040.00416.75
7.4.270.0000.00716.84
7.4.260.0110.00016.86
7.4.250.0000.00716.81
7.4.240.0050.00216.76
7.4.230.0000.00716.78
7.4.220.0140.00316.66
7.4.210.0080.00816.72
7.4.200.0040.00416.64
7.4.190.0040.00416.79
7.4.160.0070.01016.84
7.4.150.0150.00317.40
7.4.140.0030.01717.86
7.4.130.0110.00816.55
7.4.120.0160.00516.69
7.4.110.0060.01216.78
7.4.100.0110.00816.73
7.4.90.0060.01216.49
7.4.80.0100.01019.39
7.4.70.0090.00916.67
7.4.60.0060.01016.74
7.4.50.0000.00816.72
7.4.40.0110.00722.77
7.4.30.0030.01316.52
7.4.00.0040.01214.70
7.3.330.0030.00313.40
7.3.320.0000.00513.18
7.3.310.0000.00716.48
7.3.300.0030.00316.32
7.3.290.0040.01416.55
7.3.280.0080.01016.53
7.3.270.0130.00517.40
7.3.260.0060.01216.48
7.3.250.0150.00416.51
7.3.240.0150.00516.53
7.3.230.0110.01316.70
7.3.210.0100.01016.76
7.3.200.0020.01919.39
7.3.190.0160.00716.51
7.3.180.0100.00716.63
7.3.170.0100.00716.57
7.3.160.0120.00616.73
7.3.120.0090.00615.02
7.3.10.0040.00816.69
7.3.00.0030.00616.78
7.2.330.0070.01116.73
7.2.320.0130.01016.91
7.2.310.0140.00416.82
7.2.300.0050.01416.96
7.2.290.0130.00616.91
7.2.130.0070.00716.92
7.2.120.0040.00717.00
7.2.110.0030.00617.26
7.2.100.0030.00716.83
7.2.90.0000.01117.02
7.2.80.0090.00617.05
7.2.70.0060.00616.96
7.2.60.0040.00816.93
7.2.50.0000.01017.13
7.2.40.0030.01016.69
7.2.30.0070.00417.08
7.2.20.0100.00317.14
7.2.10.0100.00317.17
7.2.00.0040.00618.32
7.1.250.0060.00615.95
7.1.100.0080.00418.40
7.1.70.0080.00016.79
7.1.60.0130.01319.33
7.1.50.0100.01017.13
7.1.00.0100.07022.51
7.0.200.0040.00416.91
7.0.140.0030.07322.14
7.0.60.0070.08020.03
7.0.50.0070.03718.01
7.0.40.0030.04320.28
7.0.30.0170.04320.14
7.0.20.0200.06720.11
7.0.10.0070.04720.12
7.0.00.0070.08720.11
5.6.280.0030.09021.01
5.6.210.0170.04720.57
5.6.200.0030.08318.25
5.6.190.0130.07020.74
5.6.180.0200.04020.80
5.6.170.0270.05020.47
5.6.160.0100.08720.52
5.6.150.0270.06318.35
5.6.140.0170.07018.19
5.6.130.0130.07718.23
5.6.120.0070.07721.04
5.6.110.0030.08721.13
5.6.100.0070.09021.18
5.6.90.0070.07721.18
5.6.80.0100.04720.59
5.6.70.4430.04020.59
5.5.350.0230.07020.43
5.5.340.0100.05718.09
5.5.330.0100.04020.27
5.5.320.0070.03720.33
5.5.310.0400.07020.59
5.5.300.0100.06017.99
5.5.290.0100.04318.04
5.5.280.0030.06320.85
5.5.270.0170.07720.76
5.5.260.0100.08020.92
5.5.250.0070.08720.69
5.5.240.0230.08320.17
5.4.450.2700.03719.28
5.4.440.2730.04319.55
5.4.430.2670.03319.29
5.4.420.2970.04719.65
5.4.410.2970.04719.18
5.4.400.2470.03718.95
5.4.390.2800.03319.14
5.4.380.2630.04019.33
5.4.370.3030.03018.97
5.4.360.2470.04718.97
5.4.350.2270.04319.33
5.4.340.2830.04319.26
5.4.320.2700.03718.96
5.4.310.2600.03719.30
5.4.300.2770.04019.00
5.4.290.3030.04719.33
5.4.280.2630.05019.36
5.4.270.2730.02719.30
5.4.260.2330.04019.33
5.4.250.1670.04019.00
5.4.240.0000.04019.16
5.4.230.0100.03018.99
5.4.220.0870.04318.99
5.4.210.3000.04019.33
5.4.200.2530.03719.17
5.4.190.2600.04019.29
5.4.180.2270.03719.26
5.4.170.2570.03719.31
5.4.160.2630.04319.15
5.4.150.2700.04018.95
5.4.140.2470.03316.52
5.4.130.2430.03316.46
5.4.120.2500.04016.51
5.4.110.2400.04016.61
5.4.100.2800.02716.60
5.4.90.2700.04316.60
5.4.80.2670.03716.55
5.4.70.2570.04016.61
5.4.60.2500.03316.58
5.4.50.2530.02716.32
5.4.40.0900.03316.23
5.4.30.0030.07316.57
5.4.20.0300.04016.37
5.4.10.2530.04316.49
5.4.00.2700.04015.92
5.3.290.2730.03714.65
5.3.280.2770.04014.77
5.3.270.2600.03714.55
5.3.260.2500.04014.80
5.3.250.2900.04314.59
5.3.240.2970.03314.56
5.3.230.0030.04714.59
5.3.220.0030.03714.70
5.3.210.0070.03314.71
5.3.200.1170.05314.57
5.3.190.2470.04314.76
5.3.180.2500.04014.74
5.3.170.2730.04014.54
5.3.160.2770.04014.70
5.3.150.2630.04014.55
5.3.140.2730.04014.52
5.3.130.2570.03714.49
5.3.120.1930.04314.54
5.3.110.0130.04014.55
5.3.100.0000.04014.04
5.3.90.0930.04013.98
5.3.80.1830.05014.00
5.3.70.2330.04013.97
5.3.60.2370.03013.97
5.3.50.2470.03714.12
5.3.40.3100.04013.90
5.3.30.2770.03314.09
5.3.20.2670.03313.57
5.3.10.2330.03713.61
5.3.00.2570.03313.63
5.2.170.1970.03011.14
5.2.160.2530.03011.14
5.2.150.2200.03011.38
5.2.140.2000.02311.13
5.2.130.2030.02711.13
5.2.120.1770.03011.04
5.2.110.2030.02711.26
5.2.100.2000.03011.24
5.2.90.2270.02311.20
5.2.80.1930.03311.09
5.2.70.0470.03011.09
5.2.60.0000.04311.05
5.2.50.0000.03011.18
5.2.40.0000.03310.98
5.2.30.0870.03311.22
5.2.20.1500.03010.90
5.2.10.1900.02310.88
5.2.00.1700.02710.83
5.1.60.1800.02310.02
5.1.50.1670.02310.06
5.1.40.1930.03010.01
5.1.30.1900.02710.27
5.1.20.1930.02710.39
5.1.10.1930.03310.13
5.1.00.1770.02310.12
5.0.50.1030.0278.49
5.0.40.0200.0238.45
5.0.30.0000.0338.31
5.0.20.0000.0378.31
5.0.10.0000.0208.31
5.0.00.0100.0308.32
4.4.90.0070.0178.31
4.4.80.0030.0378.31
4.4.70.0030.0278.31
4.4.60.0430.0138.31
4.4.50.0900.0208.31
4.4.40.0970.0338.31
4.4.30.1030.0208.31
4.4.20.0830.0138.31
4.4.10.0800.0138.31
4.4.00.0800.0238.31
4.3.110.0770.0208.31
4.3.100.1030.0208.31
4.3.90.0830.0108.31
4.3.80.0800.0238.31
4.3.70.1030.0238.31
4.3.60.0930.0208.31
4.3.50.0930.0208.31
4.3.40.0900.0208.31
4.3.30.0430.0108.31
4.3.20.0400.0208.31
4.3.10.0570.0238.31
4.3.00.0400.0178.31

preferences:
61.63 ms | 401 KiB | 5 Q