3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <items> <hats> <a id="Chicago BULLS" img="bulls.jpeg" cost="$25.00" /> <b id="Toronto RAPTORS" img="raptors.jpeg" cost="$25.00" /> <c id="Orlando MAGIC" img="magic.jpeg" cost="$25.00" /> </hats> <clothes> <a id="Chicago BULLS 23" img="bullstee.jpeg" cost="$30.00" /> <b id="Toronto RAPTORS 23" img="torontotee.jpeg" cost="$30.00" /> <c id="Orlando MAGIC 23" img="magictee.jpeg" cost="$30.00" /> </clothes> </items> XML; $xml = simplexml_load_string($x); foreach ($xml->children() as $name => $value) { echo "$name: <br />"; foreach ($name->children() as $item) { echo "$item[id], $item[img], $item[cost]<br />"; } }

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.0170.00318.80
8.3.50.0110.00921.21
8.3.40.0110.00418.94
8.3.30.0070.00720.59
8.3.20.0060.00320.78
8.3.10.0000.00821.12
8.3.00.0080.00023.91
8.2.180.0040.01416.86
8.2.170.0070.00722.96
8.2.160.0170.00320.52
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0070.00021.25
8.2.110.0030.00620.83
8.2.100.0040.00718.09
8.2.90.0040.00419.42
8.2.80.0040.00419.53
8.2.70.0040.00417.88
8.2.60.0030.00518.02
8.2.50.0060.00318.07
8.2.40.0050.00318.34
8.2.30.0040.00419.76
8.2.20.0030.00517.91
8.2.10.0030.00517.99
8.2.00.0000.00818.00
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0050.00226.35
8.1.250.0050.00328.09
8.1.240.0070.00422.57
8.1.230.0070.00420.98
8.1.220.0040.00418.77
8.1.210.0000.00819.11
8.1.200.0030.00717.47
8.1.190.0080.00017.78
8.1.180.0000.00818.10
8.1.170.0030.00518.90
8.1.160.0050.00319.21
8.1.150.0070.00018.84
8.1.140.0040.00417.64
8.1.130.0000.00718.08
8.1.120.0000.00717.54
8.1.110.0050.00317.56
8.1.100.0000.00717.75
8.1.90.0000.00717.54
8.1.80.0070.00017.66
8.1.70.0000.00717.54
8.1.60.0000.00717.88
8.1.50.0000.00817.77
8.1.40.0000.00817.84
8.1.30.0000.00817.74
8.1.20.0030.00517.77
8.1.10.0000.00817.84
8.1.00.0000.00817.66
8.0.300.0050.00320.04
8.0.290.0070.00017.41
8.0.280.0000.00718.58
8.0.270.0040.00417.46
8.0.260.0000.00717.14
8.0.250.0070.00017.19
8.0.240.0030.00617.11
8.0.230.0050.00317.25
8.0.220.0070.00017.07
8.0.210.0070.00316.99
8.0.200.0030.00317.15
8.0.190.0030.00317.15
8.0.180.0000.00717.21
8.0.170.0040.00417.22
8.0.160.0000.00717.10
8.0.150.0040.00417.13
8.0.140.0040.00817.05
8.0.130.0000.00613.69
8.0.120.0040.00417.05
8.0.110.0000.00816.96
8.0.100.0040.00417.13
8.0.90.0040.00417.04
8.0.80.0120.00317.11
8.0.70.0040.00417.15
8.0.60.0030.00516.93
8.0.50.0040.00417.16
8.0.30.0100.01017.44
8.0.20.0090.01317.41
8.0.10.0000.00717.21
8.0.00.0070.01116.98
7.4.330.0040.00015.31
7.4.320.0030.00316.70
7.4.300.0000.00816.70
7.4.290.0000.00716.90
7.4.280.0070.00016.75
7.4.270.0070.00016.64
7.4.260.0030.00513.52
7.4.250.0040.00416.78
7.4.240.0040.00416.73
7.4.230.0000.00716.58
7.4.220.0190.00616.72
7.4.210.0060.01116.79
7.4.200.0030.00316.81
7.4.190.0000.00716.74
7.4.160.0100.01316.80
7.4.150.0100.00717.40
7.4.140.0100.00917.86
7.4.130.0090.01116.78
7.4.120.0080.01016.71
7.4.110.0210.00316.71
7.4.100.0140.00316.71
7.4.90.0060.01216.67
7.4.80.0060.01519.39
7.4.70.0080.01216.75
7.4.60.0110.00716.68
7.4.50.0060.00316.76
7.4.40.0120.00622.77
7.4.30.0070.01016.80
7.4.00.0070.00715.00
7.3.330.0030.00313.41
7.3.320.0000.00513.18
7.3.310.0030.00316.38
7.3.300.0000.00716.39
7.3.290.0030.01116.48
7.3.280.0090.00716.57
7.3.270.0060.01117.40
7.3.260.0180.00718.24
7.3.250.0070.01016.69
7.3.240.0120.00416.66
7.3.230.0070.01016.79
7.3.210.0110.00716.66
7.3.200.0090.00919.39
7.3.190.0040.01416.61
7.3.180.0140.00316.55
7.3.170.0000.02016.64
7.3.160.0090.00916.71
7.3.120.0060.00915.09
7.2.330.0130.00316.91
7.2.320.0100.01316.95
7.2.310.0080.01516.90
7.2.300.0070.01016.60
7.2.290.0030.01316.72
7.2.60.0110.00417.18
7.2.00.0000.01419.67
7.1.200.0050.01015.85
7.1.100.0000.00918.30
7.1.70.0100.00617.01
7.1.60.0110.01419.17
7.1.50.0100.01617.20
7.1.00.0030.07722.59
7.0.200.0000.00717.07
7.0.140.0030.07322.10
7.0.110.0030.07719.99
7.0.100.0030.04720.01
7.0.90.0400.04719.98
7.0.80.0270.05320.02
7.0.70.0430.03720.01
7.0.60.0670.04020.16
7.0.50.0500.03020.13
7.0.40.0070.04019.77
7.0.30.0130.08719.81
7.0.20.0000.05019.75
7.0.10.0130.05719.88
7.0.00.0030.06019.86
5.6.280.0030.07321.05
5.6.260.0000.03720.75
5.6.250.0070.08020.68
5.6.240.0170.06320.77
5.6.230.0100.09720.71
5.6.220.0100.03720.64
5.6.210.0100.03720.67
5.6.200.0070.04320.66
5.6.190.0030.04320.75
5.6.180.0000.05020.66
5.6.170.0100.07020.65
5.6.160.0070.05720.74
5.6.150.0100.03320.65
5.6.140.0000.04320.73
5.6.130.0100.04720.60
5.6.120.0030.06020.63
5.6.110.0130.05320.72
5.6.100.0070.03720.65
5.6.90.0070.08020.64
5.6.80.0000.06020.14
5.6.70.0130.06720.03
5.6.60.0000.04320.12
5.6.50.0070.03720.12
5.6.40.0100.06020.10
5.6.30.0100.07020.02
5.6.20.0070.04320.01
5.6.10.0070.03720.15
5.6.00.0070.03720.07
5.5.380.0130.06017.80
5.5.370.0030.04017.66
5.5.360.0130.07317.70
5.5.350.0100.03717.52
5.5.340.0070.05018.06
5.5.330.0030.07318.30
5.5.320.0030.07717.94
5.5.310.0030.06718.08
5.5.300.0030.04017.94
5.5.290.0030.04718.27
5.5.280.0030.05717.96
5.5.270.0100.05018.06
5.5.260.0100.03717.94
5.5.250.0030.04017.75
5.5.240.0100.05317.63
5.5.230.0070.03717.68
5.5.220.0070.02717.46
5.5.210.0100.03717.34
5.5.200.0030.04017.66
5.5.190.0030.06317.80
5.5.180.0030.04317.44
5.5.160.0000.07717.34
5.5.150.0000.04317.32
5.5.140.0030.04717.29
5.5.130.0030.03717.29
5.5.120.0070.03717.65
5.5.110.0030.04017.32
5.5.100.0070.04017.45
5.5.90.0000.04017.55
5.5.80.0000.05017.55
5.5.70.0030.03717.09
5.5.60.0100.03017.21
5.5.50.0000.03717.51
5.5.40.0000.03717.54
5.5.30.0000.04717.69
5.5.20.0070.03717.33
5.5.10.0000.03317.18
5.5.00.0070.07717.44
5.4.450.0000.06319.68
5.4.440.0100.06719.63
5.4.430.0070.03719.55
5.4.420.0000.04319.39
5.4.410.0100.03319.21
5.4.400.0070.03719.34
5.4.390.0000.04019.10
5.4.380.0100.07019.07
5.4.370.0030.04319.11
5.4.360.0000.04019.16
5.4.350.0030.04019.16
5.4.340.0070.04019.14
5.4.320.0000.04319.21
5.4.310.0070.03719.10
5.4.300.0000.03719.18
5.4.290.0000.03719.06
5.4.280.0030.03719.17
5.4.270.0070.02719.12
5.4.260.0030.03319.36
5.4.250.0000.04719.04
5.4.240.0100.03019.15
5.4.230.0030.03719.09
5.4.220.0070.03319.17
5.4.210.0000.04719.04
5.4.200.0000.03719.18
5.4.190.0100.02319.20
5.4.180.0030.05719.17
5.4.170.0000.04319.27
5.4.160.0000.03319.08
5.4.150.0070.04019.19
5.4.140.0000.04716.31
5.4.130.0000.07016.34
5.4.120.0070.03016.59
5.4.110.0070.06016.25
5.4.100.0000.03316.24
5.4.90.0070.02716.32
5.4.80.0100.03716.71
5.4.70.0030.05716.33
5.4.60.0030.07016.68
5.4.50.0000.03716.72
5.4.40.0100.07016.63
5.4.30.0070.04016.31
5.4.20.0070.05016.31
5.4.10.0070.03716.67
5.4.00.0100.03315.91
5.3.290.0130.05014.73
5.3.280.0070.04314.58
5.3.270.0100.03014.63
5.3.260.0070.03714.74
5.3.250.0030.04314.69
5.3.240.0030.06314.53
5.3.230.0130.04714.60
5.3.220.0030.05714.74
5.3.210.0070.03314.58
5.3.200.0070.03714.63
5.3.190.0070.04714.61
5.3.180.0170.02714.69
5.3.170.0100.04014.57
5.3.160.0070.06314.65
5.3.150.0100.03014.52
5.3.140.0100.06014.57
5.3.130.0070.03714.64
5.3.120.0030.03314.52
5.3.110.0130.08014.60
5.3.100.0100.03014.06
5.3.90.0000.05314.15
5.3.80.0070.07014.11
5.3.70.0100.05314.03
5.3.60.0000.04313.97
5.3.50.0070.03713.99
5.3.40.0100.03313.94
5.3.30.0000.04313.91
5.3.20.0030.03713.72
5.3.10.0030.06313.67
5.3.00.0030.03713.60
5.2.170.0070.03012.07
5.2.160.0030.04312.07
5.2.150.0000.03312.07
5.2.140.0030.03712.07
5.2.130.0030.02712.07
5.2.120.0070.02712.07
5.2.110.0130.01712.07
5.2.100.0070.02712.07
5.2.90.0030.03012.07
5.2.80.0070.05312.07
5.2.70.0000.05012.07
5.2.60.0030.04012.07
5.2.50.0000.05712.07
5.2.40.0030.02712.07
5.2.30.0000.03312.07
5.2.20.0030.03012.07
5.2.10.0100.05312.07
5.2.00.0030.04012.07
5.1.60.0070.03312.07
5.1.50.0100.04012.07
5.1.40.0070.04312.07
5.1.30.0070.03312.07
5.1.20.0130.01712.07
5.1.10.0000.02712.07
5.1.00.0030.02712.07
5.0.50.0000.02312.07
5.0.40.0000.02012.07
5.0.30.0000.03312.07
5.0.20.0000.02312.07
5.0.10.0000.04012.07
5.0.00.0000.03712.07
4.4.90.0000.02012.07
4.4.80.0000.02012.07
4.4.70.0030.01312.07
4.4.60.0030.02312.07
4.4.50.0000.02312.07
4.4.40.0030.02312.07
4.4.30.0000.01712.07
4.4.20.0030.03312.07
4.4.10.0030.01712.07
4.4.00.0000.03712.07
4.3.110.0000.01712.07
4.3.100.0000.01712.07
4.3.90.0000.01712.07
4.3.80.0000.02312.07
4.3.70.0000.01312.07
4.3.60.0030.01312.07
4.3.50.0030.01712.07
4.3.40.0030.03712.07
4.3.30.0100.00712.07
4.3.20.0000.03012.07
4.3.10.0030.01312.07
4.3.00.0000.01312.07

preferences:
40.05 ms | 401 KiB | 5 Q