3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlStr = <<<XML <?xml version='1.0' standalone='yes'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> </character> <character> <name>Mr. Coder</name> <actor>El Act&#211;r</actor> </character> </characters> <plot> So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a documentary. </plot> <great-lines> <line>PHP solves all my web problems</line> </great-lines> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> <movie> <title>Title</title> <characters> <character> <name>Ms. Smith</name> <actor>Jane Doe</actor> </character> <character> <name>Mr. Smith</name> <actor>John Doe</actor> </character> </characters> <plot> There is no plot. </plot> <great-lines> <line>Yes?</line> <line>No!</line> </great-lines> <rating type="thumbs">3</rating> <rating type="stars">2</rating> </movie> </movies> XML; $xml = simplexml_load_string($xmlStr); echo '$xml:', "\n"; var_dump($xml); echo "\n"; echo '$xml->movies:', "\n"; var_dump($xml->movies); echo "\n"; echo '$xml->movies->movie:', "\n"; var_dump($xml->movies->movie); echo "\n"; echo '$xml->movies->movie[0]:', "\n"; var_dump($xml->movies->movie[0]); echo "\n"; echo 'iterator_to_array($xml->movies->movie):', "\n"; var_dump(iterator_to_array($xml->movies->movie)); echo "\n"; echo 'iterator_to_array($xml->movies):', "\n"; var_dump(iterator_to_array($xml->movies)); echo "\n";

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.70.0140.00718.80
8.3.60.0080.00817.25
8.3.50.0100.01022.14
8.3.40.0090.00619.04
8.3.30.0100.00719.34
8.3.20.0080.00020.38
8.3.10.0080.00023.73
8.3.00.0060.00319.51
8.2.180.0110.01118.54
8.2.170.0090.00622.96
8.2.160.0070.00720.66
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0060.00322.42
8.2.110.0030.00722.36
8.2.100.0170.00418.09
8.2.90.0040.00419.47
8.2.80.0040.00418.29
8.2.70.0040.00417.88
8.2.60.0050.00318.18
8.2.50.0080.00018.07
8.2.40.0000.00820.20
8.2.30.0000.01018.28
8.2.20.0080.00018.11
8.2.10.0050.00318.34
8.2.00.0060.00318.00
8.1.280.0080.00825.92
8.1.270.0060.00324.09
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.01024.04
8.1.230.0110.00019.35
8.1.220.0050.00317.91
8.1.210.0000.00818.77
8.1.200.0030.00717.59
8.1.190.0000.00817.60
8.1.180.0030.00619.26
8.1.170.0050.00318.74
8.1.160.0030.00522.21
8.1.150.0000.00818.84
8.1.140.0040.00417.63
8.1.130.0070.00017.96
8.1.120.0040.00417.58
8.1.110.0000.00817.70
8.1.100.0080.00017.53
8.1.90.0050.00317.61
8.1.80.0000.00917.55
8.1.70.0070.00017.54
8.1.60.0060.00317.66
8.1.50.0040.00417.59
8.1.40.0050.00517.79
8.1.30.0030.00617.73
8.1.20.0050.00317.86
8.1.10.0040.00417.65
8.1.00.0050.00317.77
8.0.300.0030.00520.89
8.0.290.0050.00317.41
8.0.280.0000.00718.58
8.0.270.0000.00717.49
8.0.260.0070.00017.50
8.0.250.0080.00017.18
8.0.240.0040.00417.10
8.0.230.0000.00717.19
8.0.220.0030.00317.01
8.0.210.0080.00017.14
8.0.200.0000.00717.23
8.0.190.0040.00417.13
8.0.180.0080.00017.03
8.0.170.0000.00917.11
8.0.160.0000.00817.14
8.0.150.0050.00317.03
8.0.140.0040.00417.01
8.0.130.0000.00613.60
8.0.120.0000.00817.00
8.0.110.0000.00817.20
8.0.100.0040.00417.09
8.0.90.0080.00017.05
8.0.80.0060.00917.15
8.0.70.0030.00617.02
8.0.60.0040.00416.98
8.0.50.0040.00417.06
8.0.30.0050.01617.29
8.0.20.0130.00917.40
8.0.10.0040.00417.13
8.0.00.0110.00917.04
7.4.330.0030.00315.00
7.4.320.0030.00316.85
7.4.300.0000.00616.77
7.4.290.0040.00416.91
7.4.280.0110.00016.77
7.4.270.0030.00616.65
7.4.260.0000.00716.76
7.4.250.0080.00016.84
7.4.240.0000.00816.77
7.4.230.0000.00816.86
7.4.220.0070.01416.71
7.4.210.0070.01016.89
7.4.200.0040.00416.95
7.4.190.0000.00816.91
7.4.160.0080.01116.82
7.4.150.0180.00317.40
7.4.140.0110.01317.86
7.4.130.0090.01316.76
7.4.120.0130.00716.85
7.4.110.0070.01316.84
7.4.100.0000.01816.84
7.4.90.0090.00916.82
7.4.80.0160.00619.39
7.4.70.0140.01016.81
7.4.60.0110.00716.71
7.4.50.0030.00616.83
7.4.40.0070.01416.82
7.4.30.0170.00716.67
7.4.00.0140.00314.87
7.3.330.0040.00313.27
7.3.320.0000.00513.36
7.3.310.0080.00016.48
7.3.300.0030.00316.48
7.3.290.0060.01016.45
7.3.280.0060.01116.52
7.3.270.0150.00917.40
7.3.260.0120.00616.77
7.3.250.0140.00516.62
7.3.240.0120.00616.57
7.3.230.0200.00016.63
7.3.210.0070.01716.69
7.3.200.0040.00519.39
7.3.190.0080.01316.70
7.3.180.0030.01616.79
7.3.170.0120.00916.63
7.3.160.0160.00316.49
7.3.120.0120.00414.89
7.3.10.0030.00616.71
7.3.00.0110.00416.91
7.2.330.0090.00916.87
7.2.320.0090.00916.93
7.2.310.0070.01316.79
7.2.300.0080.01116.92
7.2.290.0130.01016.88
7.2.130.0030.01317.27
7.2.120.0060.00916.98
7.2.110.0030.01217.10
7.2.100.0040.00817.20
7.2.90.0060.01016.97
7.2.80.0070.01116.90
7.2.70.0060.00917.09
7.2.60.0100.00616.95
7.2.50.0070.00717.13
7.2.40.0120.00317.08
7.2.30.0030.01317.08
7.2.20.0000.02017.18
7.2.10.0060.00616.96
7.2.00.0060.00718.06
7.1.250.0040.00716.06
7.1.200.0040.01115.90
7.1.100.0030.01318.15
7.1.70.0000.00816.97
7.1.60.0090.01519.46
7.1.50.0140.02135.04
7.1.00.0000.07722.65
7.0.200.0220.01015.03
7.0.140.0070.07022.16
7.0.110.0630.08020.02
7.0.100.0630.07019.99
7.0.90.0600.07320.00
7.0.80.0600.08020.04
7.0.70.0600.08020.07
7.0.60.0570.08320.09
7.0.50.0500.05019.94
7.0.40.0070.08719.81
7.0.30.0030.07019.77
7.0.20.0130.07719.78
7.0.10.0100.08319.70
7.0.00.0030.05319.79
5.6.280.0030.07321.14
5.6.260.0170.07320.72
5.6.250.0070.04720.74
5.6.240.0070.09020.78
5.6.230.0070.04720.61
5.6.220.0170.07020.69
5.6.210.0070.08020.88
5.6.200.0100.08320.68
5.6.190.0170.07320.63
5.6.180.0030.08720.70
5.6.170.0100.04320.61
5.6.160.0170.07320.73
5.6.150.0070.09020.62
5.6.140.0030.07320.59
5.6.130.0030.08720.68
5.6.120.0100.06020.65
5.6.110.0170.07320.61
5.6.100.0000.09320.64
5.6.90.0070.05320.84
5.6.80.0070.08319.98
5.6.70.0100.05720.08
5.6.60.0070.07019.98
5.6.50.0100.08020.07
5.6.40.0100.08020.07
5.6.30.0100.06719.98
5.6.20.0070.07320.05
5.6.10.0130.07319.97
5.6.00.0130.07720.11
5.5.380.0070.07017.67
5.5.370.0000.05017.68
5.5.360.0100.06717.72
5.5.350.0070.06717.50
5.5.340.0100.04018.07
5.5.330.0100.04317.85
5.5.320.0200.06317.95
5.5.310.0070.07717.99
5.5.300.0000.09317.97
5.5.290.0070.08717.95
5.5.280.0070.07317.95
5.5.270.0100.07317.94
5.5.260.0000.08018.28
5.5.250.0100.04018.13
5.5.240.0130.05717.24
5.5.230.0030.06317.38
5.5.220.0030.05317.49
5.5.210.0030.08017.66
5.5.200.0170.06317.64
5.5.190.0070.07317.59
5.5.180.0000.07317.45
5.5.160.0100.07017.30
5.5.150.0170.04017.81
5.5.140.0030.08017.65
5.5.130.0070.07017.28
5.5.120.0070.06317.81
5.5.110.0170.07017.65
5.5.100.0100.07317.32
5.5.90.0100.03317.52
5.5.80.0070.07317.26
5.5.70.0070.07717.33
5.5.60.0130.07017.30
5.5.50.0000.05017.46
5.5.40.0130.07317.44
5.5.30.0100.07717.16
5.5.20.0100.07717.47
5.5.10.0100.07317.21
5.5.00.0070.07317.30
5.4.450.0100.08019.39
5.4.440.0170.08019.50
5.4.430.0030.05019.34
5.4.420.0070.07719.34
5.4.410.0100.07719.50
5.4.400.0070.07719.14
5.4.390.0030.08019.30
5.4.380.0030.06319.28
5.4.370.0030.07319.16
5.4.360.0100.07319.02
5.4.350.0070.07319.05
5.4.340.0100.07319.06
5.4.320.0070.07318.98
5.4.310.0130.06319.06
5.4.300.0130.06719.17
5.4.290.0100.04019.34
5.4.280.0030.07319.02
5.4.270.0170.06319.03
5.4.260.0070.04319.03
5.4.250.0100.07019.05
5.4.240.0030.04719.04
5.4.230.0070.07719.27
5.4.220.0170.07019.28
5.4.210.0000.04719.02
5.4.200.0130.04719.16
5.4.190.0000.05719.26
5.4.180.0130.07019.05
5.4.170.0130.07319.33
5.4.160.0070.05018.96
5.4.150.0100.07019.02
5.4.140.0070.07016.36
5.4.130.0030.08016.61
5.4.120.0070.07716.63
5.4.110.0070.04316.51
5.4.100.0070.07716.36
5.4.90.0100.07016.69
5.4.80.0030.07316.64
5.4.70.0000.06016.64
5.4.60.0030.04316.34
5.4.50.0100.06716.66
5.4.40.0030.07716.59
5.4.30.0070.07316.29
5.4.20.0130.07016.43
5.4.10.0000.06316.19
5.4.00.0030.04016.02
5.3.290.0100.07714.82
5.3.280.0000.08314.74
5.3.270.0170.06714.64
5.3.260.0070.07314.71
5.3.250.0030.07314.79
5.3.240.0030.04714.73
5.3.230.0100.06714.70
5.3.220.0100.07014.59
5.3.210.0070.07714.71
5.3.200.0030.08014.67
5.3.190.0030.08014.61
5.3.180.0070.07714.66
5.3.170.0100.07314.73
5.3.160.0170.06014.55
5.3.150.0070.04014.64
5.3.140.0170.06314.62
5.3.130.0030.07314.48
5.3.120.0000.07014.62
5.3.110.0100.07014.58
5.3.100.0030.04014.02
5.3.90.0070.05014.05
5.3.80.0070.04313.99
5.3.70.0130.06314.12
5.3.60.0030.07313.93
5.3.50.0070.08013.99
5.3.40.0000.07314.12
5.3.30.0070.07313.94
5.3.20.0030.07713.80
5.3.10.0100.06713.74
5.3.00.0070.06713.66
5.2.170.0030.04011.32
5.2.160.0030.06711.19
5.2.150.0000.06011.18
5.2.140.0100.06011.30
5.2.130.0130.05711.21
5.2.120.0070.06011.12
5.2.110.0070.03711.13
5.2.100.0070.03311.23
5.2.90.0070.03311.14
5.2.80.0070.05311.19
5.2.70.0070.05711.04
5.2.60.0130.05711.16
5.2.50.0070.05311.14
5.2.40.0000.06011.12
5.2.30.0000.06711.08
5.2.20.0070.06011.04
5.2.10.0070.06311.22
5.2.00.0070.03710.84
5.1.60.0030.05310.22
5.1.50.0000.05310.39
5.1.40.0030.05310.18
5.1.30.0030.03710.61
5.1.20.0030.03010.72
5.1.10.0000.06310.39
5.1.00.0000.05710.21
5.0.50.0070.0408.77
5.0.40.0000.0408.63
5.0.30.0000.0638.46
5.0.20.0030.0308.46
5.0.10.0000.0478.48
5.0.00.0000.0638.33
4.4.90.0030.0377.03
4.4.80.0030.0377.03
4.4.70.0030.0377.03
4.4.60.0030.0307.03
4.4.50.0000.0377.03
4.4.40.0000.0577.03
4.4.30.0070.0277.03
4.4.20.0000.0377.03
4.4.10.0030.0337.03
4.4.00.0070.0507.03
4.3.110.0000.0407.03
4.3.100.0000.0337.03
4.3.90.0000.0337.03
4.3.80.0030.0537.04
4.3.70.0030.0337.04
4.3.60.0100.0237.04
4.3.50.0030.0337.04
4.3.40.0000.0477.04
4.3.30.0000.0237.04
4.3.20.0030.0337.04
4.3.10.0030.0337.04
4.3.00.0030.0337.04

preferences:
35.3 ms | 401 KiB | 5 Q