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 ($value->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.70.0120.00318.30
8.3.60.0110.00418.43
8.3.50.0070.00722.04
8.3.40.0090.01219.04
8.3.30.0110.00419.34
8.3.20.0040.00420.59
8.3.10.0070.00022.02
8.3.00.0030.00517.80
8.2.190.0100.01018.44
8.2.180.0060.01516.88
8.2.170.0090.00622.96
8.2.160.0100.00322.43
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0070.00021.11
8.2.110.0060.00320.59
8.2.100.0070.00418.47
8.2.90.0000.00819.33
8.2.80.0060.00317.97
8.2.70.0050.00517.75
8.2.60.0040.00418.29
8.2.50.0090.00018.07
8.2.40.0000.00818.25
8.2.30.0000.00718.49
8.2.20.0070.00318.02
8.2.10.0040.00418.31
8.2.00.0000.00717.86
8.1.280.0110.00425.92
8.1.270.0060.00323.91
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0070.00324.04
8.1.230.0120.00019.29
8.1.220.0000.00818.01
8.1.210.0040.00418.77
8.1.200.0060.00317.50
8.1.190.0000.00917.50
8.1.180.0080.00018.10
8.1.170.0050.00318.77
8.1.160.0070.00022.21
8.1.150.0070.00319.11
8.1.140.0040.00417.61
8.1.130.0030.00518.09
8.1.120.0030.00317.66
8.1.110.0040.00417.69
8.1.100.0020.00517.57
8.1.90.0040.00417.61
8.1.80.0030.00517.72
8.1.70.0080.00017.74
8.1.60.0000.00917.71
8.1.50.0000.00817.68
8.1.40.0080.00017.60
8.1.30.0000.00817.83
8.1.20.0040.00417.89
8.1.10.0040.00417.81
8.1.00.0000.00817.59
8.0.300.0030.00518.77
8.0.290.0030.00617.00
8.0.280.0040.00418.67
8.0.270.0000.00717.10
8.0.260.0100.00017.53
8.0.250.0030.00317.11
8.0.240.0030.00317.14
8.0.230.0040.00417.10
8.0.220.0030.00617.15
8.0.210.0040.00417.21
8.0.200.0070.00417.18
8.0.190.0040.00417.28
8.0.180.0000.00717.09
8.0.170.0000.00817.08
8.0.160.0050.00217.23
8.0.150.0000.00816.98
8.0.140.0030.00517.15
8.0.130.0000.00613.61
8.0.120.0040.00417.18
8.0.110.0030.00517.19
8.0.100.0000.00717.13
8.0.90.0080.00016.99
8.0.80.0070.01417.14
8.0.70.0050.00317.04
8.0.60.0000.00817.23
8.0.50.0050.00317.12
8.0.30.0080.01017.38
8.0.20.0090.00817.33
8.0.10.0070.00717.31
8.0.00.0070.01117.04
7.4.330.0060.00015.20
7.4.320.0060.00016.73
7.4.300.0000.00716.63
7.4.290.0070.00016.74
7.4.280.0040.00416.79
7.4.270.0050.00216.73
7.4.260.0000.00716.64
7.4.250.0040.00416.88
7.4.240.0020.00516.76
7.4.230.0030.00316.51
7.4.220.0110.00716.76
7.4.210.0090.00616.82
7.4.200.0030.00316.81
7.4.160.0080.00816.92
7.4.150.0110.00717.12
7.4.140.0100.00717.51
7.4.130.0090.00716.77
7.4.120.0130.00716.72
7.4.110.0120.00316.75
7.4.100.0130.00616.81
7.4.90.0090.00716.74
7.4.80.0100.00617.55
7.4.70.0030.01416.74
7.4.60.0120.00416.71
7.4.50.0120.00316.75
7.4.40.0110.00616.73
7.4.30.0070.01016.73
7.4.20.0120.00716.75
7.4.10.0070.01116.70
7.4.00.0090.00516.36
7.3.330.0030.00313.48
7.3.320.0000.00513.49
7.3.310.0000.00716.43
7.3.300.0000.00716.57
7.3.290.0060.01016.45
7.3.280.0080.00816.54
7.3.270.0090.00517.00
7.3.260.0120.00316.60
7.3.250.0100.00716.67
7.3.240.0060.01016.59
7.3.230.0110.00516.73
7.3.220.0120.00616.54
7.3.210.0040.01516.62
7.3.200.0070.01017.48
7.3.190.0080.00816.55
7.3.180.0070.00916.62
7.3.170.0050.01116.63
7.3.160.0080.01116.70
7.3.150.0110.00616.76
7.3.140.0070.00916.57
7.3.130.0110.00516.66
7.3.120.0080.00716.21
7.3.110.0080.00716.53
7.3.100.0090.00816.52
7.3.90.0130.00616.65
7.3.80.0070.01015.85
7.3.70.0110.00816.02
7.3.60.0140.00715.90
7.3.50.0100.00916.00
7.3.40.0130.00715.89
7.3.30.0110.00815.80
7.3.20.0140.00816.71
7.3.10.0110.00816.61
7.3.00.0110.00916.64
7.2.340.0190.00916.80
7.2.330.0200.00516.76
7.2.320.0130.00716.82
7.2.310.0170.00916.71
7.2.300.0150.01016.72
7.2.290.0150.00716.79
7.2.280.0120.01216.70
7.2.270.0120.01216.68
7.2.260.0160.00916.81
7.2.250.0120.01016.79
7.2.240.0180.00516.80
7.2.230.0200.00516.87
7.2.220.0110.01216.76
7.2.210.0120.01216.05
7.2.200.0200.00916.05
7.2.190.0130.01116.07
7.2.180.0170.00816.04
7.2.170.0140.01216.10
7.2.160.0170.00716.06
7.2.150.0170.00916.84
7.2.140.0180.00716.92
7.2.130.0130.00916.77
7.2.120.0130.00916.94
7.2.110.0120.01016.93
7.2.100.0090.01316.89
7.2.90.0140.00817.27
7.2.80.0140.00917.33
7.2.70.0140.00717.27
7.2.60.0120.01017.21
7.2.50.0110.01217.18
7.2.40.0160.00917.32
7.2.30.0120.01017.27
7.2.20.0130.01117.25
7.2.10.0110.01117.25
7.2.00.0100.01217.64
7.1.330.0260.00815.86
7.1.320.0200.00915.92
7.1.310.0190.00815.85
7.1.300.0190.00715.81
7.1.290.0160.01015.76
7.1.280.0150.00915.85
7.1.270.0160.00915.77
7.1.260.0220.01115.70
7.1.250.0140.01015.81
7.1.240.0190.00715.72
7.1.230.0260.00715.82
7.1.220.0170.00916.10
7.1.210.0160.00816.07
7.1.200.0160.00916.12
7.1.190.0180.00716.14
7.1.180.0140.01216.17
7.1.170.0150.01016.16
7.1.160.0150.01216.12
7.1.150.0190.00916.19
7.1.140.0170.00816.11
7.1.130.0190.00616.11
7.1.120.0180.00816.12
7.1.110.0310.00616.12
7.1.100.0140.00916.46
7.1.90.0150.01016.12
7.1.80.0140.01016.15
7.1.70.0140.00916.38
7.1.60.0160.00616.33
7.1.50.0170.00716.28
7.1.40.0180.01216.33
7.1.30.0170.00716.23
7.1.20.0130.00916.27
7.1.10.0210.00716.22
7.1.00.0160.00516.30
7.0.330.0170.00715.40
7.0.320.0150.00815.81
7.0.310.0150.00915.76
7.0.300.0160.01015.78
7.0.290.0170.00815.81
7.0.280.0160.00915.83
7.0.270.0160.00715.84
7.0.260.0130.01115.84
7.0.250.0180.00615.85
7.0.240.0140.01015.84
7.0.230.0150.00815.83
7.0.220.0150.00815.86
7.0.210.0140.00915.78
7.0.200.0130.00816.00
7.0.190.0130.00815.98
7.0.180.0130.00815.91
7.0.170.0120.00915.89
7.0.160.0140.00915.88
7.0.150.0140.00915.88
7.0.140.0150.00715.96
7.0.130.0140.00715.98
7.0.120.0150.00715.95
7.0.110.0110.01015.99
7.0.100.0130.00916.01
7.0.90.0170.00515.89
7.0.80.0140.00715.95
7.0.70.0150.00615.93
7.0.60.0090.01115.88
7.0.50.0120.00815.95
7.0.40.0120.00815.74
7.0.30.0140.00515.72
7.0.20.0140.00515.70
7.0.10.0130.00615.71
7.0.00.0130.00915.72
5.6.400.0220.00915.46
5.6.390.0130.01315.49
5.6.380.0140.00915.52
5.6.370.0160.01115.53
5.6.360.0210.00615.36
5.6.350.0160.01015.43
5.6.340.0140.01215.42
5.6.330.0120.01015.47
5.6.320.0140.01115.48
5.6.310.0110.01415.62
5.6.300.0130.01616.30
5.6.290.0150.01616.37
5.6.280.0180.01116.42
5.6.270.0140.01516.42
5.6.260.0170.01416.42
5.6.250.0130.01716.26
5.6.240.0110.01816.32
5.6.230.0170.01316.38
5.6.220.0140.01616.36
5.6.210.0170.01416.24
5.6.200.0150.01416.36
5.6.190.0130.01616.35
5.6.180.0150.01316.28
5.6.170.0140.01516.40
5.6.160.0150.01416.51
5.6.150.0150.01516.44
5.6.140.0100.01916.37
5.6.130.0130.01716.39
5.6.120.0120.01516.40
5.6.110.0140.01316.38
5.6.100.0170.01516.35
5.6.90.0150.01416.33
5.6.80.0170.01116.17
5.6.70.0120.01416.27
5.6.60.0140.01216.22
5.6.50.0100.01816.16
5.6.40.0130.01416.15
5.6.30.0140.01416.16
5.6.20.0140.01316.11
5.6.10.0160.01216.13
5.6.00.0110.01816.18
5.5.380.0110.01715.70
5.5.370.0160.01815.72
5.5.360.0130.01915.82
5.5.350.0140.01515.78
5.5.340.0160.01415.80
5.5.330.0130.01415.65
5.5.320.0140.01515.78
5.5.310.0140.01615.84
5.5.300.0150.01515.81
5.5.290.0140.01615.80
5.5.280.0140.01515.88
5.5.270.0120.01815.77
5.5.260.0120.01915.81
5.5.250.0170.01515.74
5.5.240.0170.01215.76
5.5.230.0120.01615.62
5.5.220.0140.01515.70
5.5.210.0130.01615.66
5.5.200.0140.01415.66
5.5.190.0120.01615.68
5.5.180.0140.01515.62
5.5.170.0160.01015.30
5.5.160.0160.01315.64
5.5.150.0140.01515.51
5.5.140.0100.01915.51
5.5.130.0130.01515.66
5.5.120.0130.01615.59
5.5.110.0150.01415.59
5.5.100.0160.01315.65
5.5.90.0170.01215.68
5.5.80.0140.01415.69
5.5.70.0140.01415.60
5.5.60.0120.01715.57
5.5.50.0110.01715.60
5.5.40.0170.01215.64
5.5.30.0140.01715.65
5.5.20.0110.02115.57
5.5.10.0070.01915.59
5.5.00.0140.01615.54
5.4.450.0080.01413.43
5.4.440.0110.01613.51
5.4.430.0090.01413.38
5.4.420.0100.01413.44
5.4.410.0110.01213.38
5.4.400.0090.01213.30
5.4.390.0110.01313.38
5.4.380.0110.01213.36
5.4.370.0100.01313.36
5.4.360.0120.01013.25
5.4.350.0090.01313.29
5.4.340.0150.01213.27
5.4.330.0110.00912.22
5.4.320.0130.01213.28
5.4.310.0100.01513.30
5.4.300.0070.01613.36
5.4.290.0110.01213.29
5.4.280.0090.01313.42
5.4.270.0100.01413.29
5.4.260.0120.01213.29
5.4.250.0100.01413.25
5.4.240.0100.01313.36
5.4.230.0100.01213.23
5.4.220.0090.01513.25
5.4.210.0110.01213.32
5.4.200.0090.01713.27
5.4.190.0100.01613.25
5.4.180.0110.01313.34
5.4.170.0110.01313.28
5.4.160.0120.01113.29
5.4.150.0110.01913.34
5.4.140.0110.01413.00
5.4.130.0100.01112.96
5.4.120.0090.01412.90
5.4.110.0120.01312.94
5.4.100.0120.01212.92
5.4.90.0120.01112.86
5.4.80.0110.01212.97
5.4.70.0110.01012.96
5.4.60.0070.01712.98
5.4.50.0070.01712.90
5.4.40.0100.01112.90
5.4.30.0090.01612.83
5.4.20.0130.00812.90
5.4.10.0120.01212.95
5.4.00.0120.01112.85
5.3.290.0110.01412.72
5.3.280.0130.01012.61
5.3.270.0090.01612.69
5.3.260.0100.01912.69
5.3.250.0100.01812.67
5.3.240.0150.01212.53
5.3.230.0090.01412.62
5.3.220.0120.01112.52
5.3.210.0110.01412.52
5.3.200.0100.01312.59
5.3.190.0130.01212.61
5.3.180.0090.01612.73
5.3.170.0100.01312.77
5.3.160.0130.00812.72
5.3.150.0180.01612.79
5.3.140.0100.01312.66
5.3.130.0070.01612.52
5.3.120.0100.01412.63
5.3.110.0090.01412.61
5.3.100.0110.01212.56
5.3.90.0100.01212.67
5.3.80.0110.01212.53
5.3.70.0100.01112.48
5.3.60.0110.01312.59
5.3.50.0090.01612.63
5.3.40.0120.01112.60
5.3.30.0110.01212.69
5.3.20.0080.01412.63
5.3.10.0130.01012.45
5.3.00.0110.01212.43

preferences:
40.51 ms | 401 KiB | 5 Q