3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReadXml($str) { $xml = simplexml_load_string($str); foreach($xml as $parent) { var_dump($parent); foreach($parent as $child) { var_dump($child); } } } ReadXml('<Address><to>James</to><from>Jani</from><heading>Reminder</heading><body>Please check your mail.</body></Address>');

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.40.0150.00418.76
8.3.30.0060.00819.17
8.3.20.0040.00420.64
8.3.10.0040.00422.39
8.3.00.0030.00622.71
8.2.170.0090.00622.96
8.2.160.0150.00020.94
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0050.00319.48
8.2.110.0060.00322.33
8.2.100.0080.00318.03
8.2.90.0030.00519.30
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0050.00318.18
8.2.50.0080.00018.07
8.2.40.0040.00418.41
8.2.30.0110.00018.17
8.2.20.0040.00417.93
8.2.10.0040.00417.73
8.2.00.0030.00517.96
8.1.270.0040.00423.78
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.88
8.1.230.0080.00319.34
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0100.00017.60
8.1.190.0030.00517.66
8.1.180.0080.00018.10
8.1.170.0060.00318.78
8.1.160.0030.00622.24
8.1.150.0040.00418.86
8.1.140.0040.00417.46
8.1.130.0000.00718.02
8.1.120.0000.00717.64
8.1.110.0000.00717.71
8.1.100.0000.00717.63
8.1.90.0080.00017.60
8.1.80.0050.00217.69
8.1.70.0030.00517.69
8.1.60.0000.00817.75
8.1.50.0000.00717.68
8.1.40.0090.00317.72
8.1.30.0000.00817.86
8.1.20.0060.00317.76
8.1.10.0080.00017.68
8.1.00.0030.00617.52
8.0.300.0000.00718.77
8.0.290.0040.00417.30
8.0.280.0000.00718.67
8.0.270.0040.00417.42
8.0.260.0000.00616.93
8.0.250.0070.00017.17
8.0.240.0040.00417.13
8.0.230.0030.00317.24
8.0.220.0000.00716.98
8.0.210.0000.00717.04
8.0.200.0040.00417.09
8.0.190.0080.00317.09
8.0.180.0040.00417.05
8.0.170.0060.00317.07
8.0.160.0040.00417.01
8.0.150.0040.00416.99
8.0.140.0040.00417.09
8.0.130.0030.00313.51
8.0.120.0000.00817.05
8.0.110.0000.00716.99
8.0.100.0000.00716.85
8.0.90.0000.00716.93
8.0.80.0070.01017.16
8.0.70.0040.00416.95
8.0.60.0070.00016.97
8.0.50.0000.00717.11
8.0.30.0130.00917.46
8.0.20.0100.01417.40
8.0.10.0000.00717.34
8.0.00.0080.01216.76
7.4.330.0000.00615.35
7.4.320.0000.00616.83
7.4.300.0030.00316.66
7.4.290.0070.00416.82
7.4.280.0030.00316.68
7.4.270.0000.00716.74
7.4.260.0070.00016.82
7.4.250.0000.00716.65
7.4.240.0060.00216.75
7.4.230.0050.00216.51
7.4.220.0070.01016.75
7.4.210.0090.00816.69
7.4.200.0000.00816.77
7.4.190.0000.00716.98
7.4.160.0140.00516.41
7.4.150.0160.00917.40
7.4.140.0150.00417.86
7.4.130.0110.00916.65
7.4.120.0170.00316.66
7.4.110.0080.00816.73
7.4.100.0170.00016.69
7.4.90.0120.00916.67
7.4.80.0120.00619.39
7.4.70.0060.01116.68
7.4.60.0100.00616.50
7.4.50.0000.00716.61
7.4.40.0080.00622.77
7.4.30.0150.00316.75
7.4.00.0110.00415.17
7.3.330.0020.00213.36
7.3.320.0000.00513.28
7.3.310.0000.00716.38
7.3.300.0020.00516.36
7.3.290.0150.00016.52
7.3.280.0110.00716.45
7.3.270.0130.00617.40
7.3.260.0080.00816.53
7.3.250.0100.00716.49
7.3.240.0110.00616.62
7.3.230.0110.00716.82
7.3.210.0100.00716.83
7.3.200.0140.00819.39
7.3.190.0100.00716.86
7.3.180.0060.01016.54
7.3.170.0080.00816.57
7.3.160.0090.00616.62
7.3.120.0150.00015.14
7.2.330.0060.01716.73
7.2.320.0120.01616.73
7.2.310.0080.00816.86
7.2.300.0150.00716.84
7.2.290.0040.01316.80
7.2.60.0140.00316.76
7.1.200.0040.00715.63
7.1.100.0000.00917.83
7.1.70.0040.00717.26
7.1.60.0100.01019.82
7.1.50.0000.01116.91
7.1.00.0030.07322.50
7.0.200.0040.00716.81
7.0.140.0070.07022.10
7.0.100.0370.04719.92
7.0.90.0100.07320.00
7.0.80.0130.06019.96
7.0.70.0000.08020.16
7.0.60.0230.08320.00
7.0.50.0070.05020.34
7.0.40.0130.05020.18
7.0.30.0030.05720.05
7.0.20.0070.08020.16
7.0.10.0030.05020.17
7.0.00.0100.04320.19
5.6.280.0070.06721.17
5.6.250.0030.05320.82
5.6.240.0100.08020.68
5.6.230.0230.03720.79
5.6.220.0000.06320.68
5.6.210.0100.04720.54
5.6.200.0100.08321.14
5.6.190.0100.08021.18
5.6.180.0030.05021.14
5.6.170.0070.06321.25
5.6.160.0070.08321.00
5.6.150.0100.07021.12
5.6.140.0130.03321.18
5.6.130.0130.07021.14
5.6.120.0130.07721.06
5.6.110.0170.07321.09
5.6.100.0130.08021.14
5.6.90.0100.04021.26
5.6.80.0070.04320.36
5.6.70.0000.04720.44
5.6.60.0070.03720.46
5.6.50.0030.07720.51
5.6.40.0070.03720.36
5.6.30.0100.08320.50
5.6.20.0030.04020.53
5.6.10.0070.08020.45
5.6.00.0070.08320.43
5.5.380.0130.06720.57
5.5.370.0100.06320.61
5.5.360.0000.08320.59
5.5.350.0000.08720.49
5.5.340.0030.08321.04
5.5.330.0070.08320.84
5.5.320.0100.04321.02
5.5.310.0000.06320.97
5.5.300.0030.04321.03
5.5.290.0070.08720.84
5.5.280.0070.08720.77
5.5.270.0070.07721.03
5.5.260.0030.07720.92
5.5.250.0100.07720.59
5.5.240.0100.04020.19
5.5.230.0070.03720.32
5.5.220.0100.03320.34
5.5.210.0130.07320.15
5.5.200.0000.04320.36
5.5.190.0100.06020.28
5.5.180.0030.07720.10
5.5.160.0130.07020.20
5.5.150.0200.06320.31
5.5.140.0100.07020.09
5.5.130.0070.06020.19
5.5.120.0070.07720.27
5.5.110.0130.04320.30
5.5.100.0030.05020.27
5.5.90.0030.07720.11
5.5.80.0030.04020.21
5.5.70.0130.07320.20
5.5.60.0100.07720.13
5.5.50.0030.04720.21
5.5.40.0130.07020.08
5.5.30.0070.08020.07
5.5.20.0130.05720.09
5.5.10.0030.05720.24
5.5.00.0170.05720.09
5.4.450.0100.08019.35
5.4.440.0130.06719.45
5.4.430.0000.06719.59
5.4.420.0000.04019.43
5.4.410.0030.04019.49
5.4.400.0070.03319.12
5.4.390.0030.04019.10
5.4.380.0030.06718.94
5.4.370.0100.07019.12
5.4.360.0100.04019.36
5.4.350.0030.06719.25
5.4.340.0030.08019.23
5.4.320.0000.08319.36
5.4.310.0070.07318.95
5.4.300.0070.08718.98
5.4.290.0030.04019.21
5.4.280.0070.04719.25
5.4.270.0030.07719.21
5.4.260.0100.06719.27
5.4.250.0070.07019.22
5.4.240.0070.03719.22
5.4.230.0200.05019.29
5.4.220.0070.05319.03
5.4.210.0100.07319.25
5.4.200.0030.04319.19
5.4.190.0130.03319.21
5.4.180.0070.06019.10
5.4.170.0100.07319.27
5.4.160.0130.06719.34
5.4.150.0100.07319.10
5.4.140.0000.05016.45
5.4.130.0100.08016.39
5.4.120.0000.05716.51
5.4.110.0000.06316.45
5.4.100.0000.04016.55
5.4.90.0130.07016.61
5.4.80.0070.07316.44
5.4.70.0070.07016.50
5.4.60.0100.06316.50
5.4.50.0030.06016.54
5.4.40.0070.07016.63
5.4.30.0070.07316.54
5.4.20.0070.07016.49
5.4.10.0100.06716.64
5.4.00.0030.07716.03
5.3.290.0100.07014.72
5.3.280.0100.04014.70
5.3.270.0170.06714.84
5.3.260.0070.06714.71
5.3.250.0170.07714.80
5.3.240.0070.05714.76
5.3.230.0170.06314.76
5.3.220.0170.06314.82
5.3.210.0070.04714.64
5.3.200.0030.04714.60
5.3.190.0070.04714.60
5.3.180.0070.04014.58
5.3.170.0100.07314.80
5.3.160.0170.06314.57
5.3.150.0070.07314.72
5.3.140.0070.04014.59
5.3.130.0130.07314.70
5.3.120.0100.07314.76
5.3.110.0000.07714.71
5.3.100.0030.06314.10
5.3.90.0070.03714.14
5.3.80.0030.07014.18
5.3.70.0130.07314.14
5.3.60.0000.05014.16
5.3.50.0070.07314.20
5.3.40.0130.06013.92
5.3.30.0030.07014.14
5.3.20.0170.06313.89
5.3.10.0070.07013.86
5.3.00.0070.06313.76
5.2.170.0100.05711.64
5.2.160.0100.03011.64
5.2.150.0100.03711.64
5.2.140.0030.03711.64
5.2.130.0100.05711.64
5.2.120.0030.06311.64
5.2.110.0030.05011.64
5.2.100.0030.05311.64
5.2.90.0000.06011.64
5.2.80.0000.05011.64
5.2.70.0030.03311.64
5.2.60.0030.04311.64
5.2.50.0000.05311.64
5.2.40.0070.05011.64
5.2.30.0070.05711.64
5.2.20.0030.02711.64
5.2.10.0030.02711.64
5.2.00.0030.05711.64
5.1.60.0000.02311.64
5.1.50.0030.05711.64
5.1.40.0100.04311.64
5.1.30.0000.05311.64
5.1.20.0100.04011.64
5.1.10.0030.03011.64
5.1.00.0100.03711.64
5.0.50.0000.04711.64
5.0.40.0070.04011.64
5.0.30.0000.06011.64
5.0.20.0130.03711.64
5.0.10.0000.03311.64
5.0.00.0070.05311.64
4.4.90.0000.01711.64
4.4.80.0070.01711.64
4.4.70.0000.03711.64
4.4.60.0000.01711.64
4.4.50.0030.03311.64
4.4.40.0000.05011.64
4.4.30.0030.03711.64
4.4.20.0000.01311.64
4.4.10.0030.01311.64
4.4.00.0000.02711.64
4.3.110.0000.03311.64
4.3.100.0030.03311.64
4.3.90.0030.01311.64
4.3.80.0000.03711.64
4.3.70.0000.03011.64
4.3.60.0030.03311.64
4.3.50.0030.03011.64
4.3.40.0070.04011.64
4.3.30.0030.02311.64
4.3.20.0000.02011.64
4.3.10.0000.02011.64
4.3.00.0000.02711.64

preferences:
45.38 ms | 400 KiB | 5 Q