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->movie:', "\n"; var_dump($xml->movie); echo "\n"; echo '$xml->movie[0]:', "\n"; var_dump($xml->movie[0]); echo "\n"; echo 'iterator_to_array($xml->movie):', "\n"; var_dump(iterator_to_array($xml->movie)); echo "\n"; echo 'iterator_to_array($xml):', "\n"; var_dump(iterator_to_array($xml)); 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.60.0100.01416.63
8.3.50.0110.00822.04
8.3.40.0190.00019.00
8.3.30.0110.00419.29
8.3.20.0030.00520.39
8.3.10.0030.00623.83
8.3.00.0050.00519.50
8.2.180.0240.00018.79
8.2.170.0030.01322.96
8.2.160.0040.01120.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00426.16
8.2.120.0040.00422.33
8.2.110.0100.00020.53
8.2.100.0000.01217.97
8.2.90.0040.00419.48
8.2.80.0030.00617.97
8.2.70.0030.00618.00
8.2.60.0030.00618.18
8.2.50.0060.00318.10
8.2.40.0080.00020.20
8.2.30.0030.00519.97
8.2.20.0000.01018.02
8.2.10.0000.00818.32
8.2.00.0050.00517.95
8.1.280.0130.00625.92
8.1.270.0060.00323.96
8.1.260.0030.00626.35
8.1.250.0060.00328.09
8.1.240.0000.01022.98
8.1.230.0030.00918.08
8.1.220.0060.00317.91
8.1.210.0030.00618.77
8.1.200.0050.00517.48
8.1.190.0050.00317.48
8.1.180.0050.00318.10
8.1.170.0040.00418.75
8.1.160.0030.00522.14
8.1.150.0040.00418.76
8.1.140.0000.00817.58
8.1.130.0040.00418.04
8.1.120.0080.00017.72
8.1.110.0070.00317.52
8.1.100.0030.00517.59
8.1.90.0080.00017.69
8.1.80.0000.00817.52
8.1.70.0000.00717.54
8.1.60.0030.00617.63
8.1.50.0040.00417.71
8.1.40.0040.00417.62
8.1.30.0090.00017.77
8.1.20.0000.00817.87
8.1.10.0080.00017.82
8.1.00.0060.00317.66
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0000.00818.68
8.0.270.0040.00417.54
8.0.260.0050.00217.40
8.0.250.0050.00217.27
8.0.240.0050.00217.21
8.0.230.0000.00817.05
8.0.220.0030.00317.17
8.0.210.0050.00517.00
8.0.200.0030.00517.20
8.0.190.0090.00017.23
8.0.180.0040.00417.06
8.0.170.0080.00017.22
8.0.160.0000.00816.97
8.0.150.0090.00016.97
8.0.140.0030.00516.95
8.0.130.0070.00013.58
8.0.120.0030.00617.15
8.0.110.0040.00417.19
8.0.100.0000.00817.00
8.0.90.0070.00017.22
8.0.80.0070.01017.14
8.0.70.0000.00717.07
8.0.60.0040.00417.08
8.0.50.0030.00516.96
8.0.30.0200.00717.34
8.0.20.0140.00917.57
8.0.10.0000.00817.32
8.0.00.0110.01217.05
7.4.330.0020.00215.00
7.4.320.0030.00316.69
7.4.300.0040.00416.60
7.4.290.0000.00816.66
7.4.280.0030.00616.66
7.4.270.0000.00916.71
7.4.260.0070.00016.68
7.4.250.0030.00616.57
7.4.240.0040.00416.74
7.4.230.0070.00016.85
7.4.220.0070.02116.83
7.4.210.0090.00816.73
7.4.200.0040.00416.83
7.4.190.0050.00316.80
7.4.160.0140.00316.75
7.4.150.0150.00617.40
7.4.140.0200.00917.86
7.4.130.0140.00716.78
7.4.120.0110.00816.82
7.4.110.0170.01016.66
7.4.100.0240.00216.59
7.4.90.0150.00916.68
7.4.80.0200.00319.39
7.4.70.0100.01016.75
7.4.60.0140.00716.95
7.4.50.0030.00616.73
7.4.40.0100.01016.44
7.4.30.0150.00416.84
7.4.00.0070.01015.22
7.3.330.0020.00513.38
7.3.320.0060.00013.37
7.3.310.0000.00716.26
7.3.300.0000.00716.55
7.3.290.0030.01316.49
7.3.280.0100.01116.54
7.3.270.0190.00417.40
7.3.260.0130.01316.52
7.3.250.0110.01716.59
7.3.240.0150.01216.71
7.3.230.0080.01416.50
7.3.210.0170.01016.56
7.3.200.0100.01019.39
7.3.190.0140.01216.65
7.3.180.0100.00716.82
7.3.170.0100.01016.46
7.3.160.0100.01016.63
7.3.120.0110.00714.98
7.3.10.0130.00316.73
7.3.00.0030.00716.73
7.2.330.0150.00916.93
7.2.320.0100.01416.81
7.2.310.0040.02416.92
7.2.300.0100.01016.92
7.2.290.0090.01716.45
7.2.130.0070.00717.09
7.2.120.0060.00916.87
7.2.110.0100.00317.04
7.2.100.0060.00917.11
7.2.90.0100.00316.75
7.2.80.0000.01617.02
7.2.70.0040.01116.95
7.2.60.0040.01016.94
7.2.50.0040.01117.03
7.2.40.0120.00616.71
7.2.30.0080.00417.18
7.2.20.0070.00717.25
7.2.10.0110.00317.27
7.2.00.0040.01118.10
7.1.250.0000.00915.93
7.1.200.0130.00315.96
7.1.100.0040.00418.14
7.1.70.0070.00017.43
7.1.60.0100.01319.46
7.1.50.0130.01317.00
7.1.00.0070.07722.41
7.0.200.0190.00314.95
7.0.140.0100.07022.06
7.0.60.0000.04720.17
7.0.50.0000.08717.93
7.0.40.0170.07720.17
7.0.30.0200.04320.10
7.0.20.0300.07720.25
7.0.10.0030.07320.28
7.0.00.0030.08320.29
5.6.280.0070.07021.07
5.6.210.0100.04020.82
5.6.200.0170.07718.29
5.6.190.0000.05020.50
5.6.180.0270.07720.50
5.6.170.0370.06020.56
5.6.160.0100.08320.47
5.6.150.0000.04318.32
5.6.140.0070.06718.22
5.6.130.0170.04718.23
5.6.120.0100.04021.05
5.6.110.0030.08321.05
5.6.100.0100.04021.20
5.6.90.0130.08021.18
5.6.80.0030.04320.43
5.5.350.0370.07320.43
5.5.340.0030.06718.12
5.5.330.0030.09020.59
5.5.320.0170.04720.36
5.5.310.0330.07020.32
5.5.300.0070.03718.03
5.5.290.0070.03718.14
5.5.280.0100.10020.79
5.5.270.0070.07720.89
5.5.260.0130.08320.88
5.5.250.0070.08320.91
5.5.240.0200.06720.46
5.4.450.0400.03719.61
5.4.440.0170.05019.47
5.4.430.0600.05319.57
5.4.420.0430.03019.49
5.4.410.0370.03719.21
5.4.400.0330.04319.15
5.4.390.0270.04719.04
5.4.380.0370.03319.25
5.4.370.0470.03719.28
5.4.360.0370.03319.30
5.4.350.0330.03719.31
5.4.340.0530.05319.18
5.4.320.0370.03719.29
5.4.310.0300.04019.00
5.4.300.0300.04019.30
5.4.290.0400.03019.17
5.4.280.0370.04319.30
5.4.270.0430.03719.31
5.4.260.0400.04019.30
5.4.250.0370.05019.24
5.4.240.0500.03319.14
5.4.230.0430.06018.99
5.4.220.0370.04019.25
5.4.210.0300.04019.29
5.4.200.0330.05719.16
5.4.190.0300.04319.01
5.4.180.0400.03319.14
5.4.170.0330.04019.31
5.4.160.0370.03318.98
5.4.150.0370.03719.05
5.4.140.0470.03716.68
5.4.130.0370.03316.45
5.4.120.0370.03316.48
5.4.110.0330.03716.59
5.4.100.0330.03716.23
5.4.90.0330.03716.48
5.4.80.0230.04316.24
5.4.70.0330.03716.33
5.4.60.0470.03716.61
5.4.50.0300.04016.55
5.4.40.0330.03716.42
5.4.30.0430.02716.50
5.4.20.0370.03716.50
5.4.10.0370.03316.59
5.4.00.0430.05315.99
5.3.290.0370.03314.66
5.3.280.0330.03714.75
5.3.270.0330.04014.80
5.3.260.0330.04014.55
5.3.250.0300.04314.60
5.3.240.0400.04314.57
5.3.230.0330.03714.60
5.3.220.0330.03714.70
5.3.210.0330.03714.76
5.3.200.0330.03714.57
5.3.190.0330.04014.70
5.3.180.0330.04014.75
5.3.170.0330.04014.57
5.3.160.0330.03714.74
5.3.150.0430.04014.76
5.3.140.0370.04014.60
5.3.130.0330.04014.59
5.3.120.0430.03714.53
5.3.110.0400.03314.58
5.3.100.0330.04014.21
5.3.90.0330.04014.17
5.3.80.0370.03714.06
5.3.70.0400.06714.05
5.3.60.0570.05714.02
5.3.50.0270.04713.82
5.3.40.0430.05313.96
5.3.30.0300.04014.11
5.3.20.0270.04013.70
5.3.10.0330.03713.64
5.3.00.0370.03313.77
5.2.170.0300.04011.09
5.2.160.0270.03011.09
5.2.150.0330.03311.27
5.2.140.0300.02711.11
5.2.130.0270.03011.26
5.2.120.0370.04711.13
5.2.110.0300.04011.04
5.2.100.0430.05011.11
5.2.90.0270.03311.36
5.2.80.0300.03311.21
5.2.70.0330.03311.05
5.2.60.0230.03311.17
5.2.50.0300.03310.98
5.2.40.0270.02711.16
5.2.30.0200.03311.07
5.2.20.0330.05310.96
5.2.10.0230.03311.13
5.2.00.0330.04710.81
5.1.60.0270.02710.26
5.1.50.0230.03310.30
5.1.40.0300.02710.11
5.1.30.0270.03010.58
5.1.20.0230.02710.51
5.1.10.0230.02310.38
5.1.00.0300.02710.09
5.0.50.0170.0178.70
5.0.40.0330.0138.54
5.0.30.0170.0278.32
5.0.20.0100.0208.49
5.0.10.0200.0178.29
5.0.00.0070.0308.30
4.4.90.0100.0208.13
4.4.80.0100.0178.13
4.4.70.0130.0178.13
4.4.60.0100.0278.13
4.4.50.0130.0178.13
4.4.40.0130.0238.13
4.4.30.0100.0208.13
4.4.20.0100.0178.13
4.4.10.0130.0138.13
4.4.00.0170.0208.13
4.3.110.0100.0178.13
4.3.100.0100.0178.13
4.3.90.0130.0138.13
4.3.80.0000.0478.13
4.3.70.0030.0178.13
4.3.60.0030.0278.13
4.3.50.0000.0178.13
4.3.40.0000.0238.13
4.3.30.0000.0208.13
4.3.20.0030.0178.13
4.3.10.0030.0138.13
4.3.00.0030.0178.13

preferences:
46.8 ms | 401 KiB | 5 Q