3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReadXml($xmlstr){ $x=simplexml_load_string($xmlstr); $r='Address'; foreach((array)$x as $k=>$v)$r.="\n$k: $v"; return $r; } echo ReadXml($xmlstr= '<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.60.0070.01316.63
8.3.50.0110.01017.51
8.3.40.0120.00319.10
8.3.30.0110.00318.96
8.3.20.0060.00318.77
8.3.10.0050.00318.99
8.3.00.0030.00619.51
8.2.180.0160.00025.92
8.2.170.0140.00018.92
8.2.160.0070.00722.96
8.2.150.0030.01425.66
8.2.140.0120.00324.66
8.2.130.0040.00426.16
8.2.120.0000.01419.79
8.2.110.0060.00321.07
8.2.100.0100.00318.16
8.2.90.0080.00019.47
8.2.80.0050.00317.97
8.2.70.0090.00017.86
8.2.60.0060.00318.30
8.2.50.0060.00318.05
8.2.40.0030.00619.48
8.2.30.0030.00617.85
8.2.20.0060.00317.65
8.2.10.0050.00217.98
8.2.00.0050.00217.96
8.1.280.0030.01325.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00321.37
8.1.230.0040.00718.08
8.1.220.0080.00017.78
8.1.210.0060.00318.77
8.1.200.0060.00317.47
8.1.190.0080.00017.47
8.1.180.0030.00518.10
8.1.170.0040.00417.62
8.1.160.0000.00819.28
8.1.150.0000.00718.83
8.1.140.0030.00617.55
8.1.130.0080.00017.66
8.1.120.0070.00017.53
8.1.110.0000.00717.67
8.1.100.0000.00717.61
8.1.90.0000.00717.61
8.1.80.0000.00717.74
8.1.70.0040.00417.52
8.1.60.0080.00017.66
8.1.50.0050.00317.62
8.1.40.0030.00517.70
8.1.30.0000.00817.75
8.1.20.0060.00717.87
8.1.10.0000.00717.77
8.1.00.0000.00717.51
8.0.300.0060.00318.77
8.0.290.0000.00816.88
8.0.280.0070.00018.70
8.0.270.0040.00417.52
8.0.260.0000.00817.02
8.0.250.0060.00317.23
8.0.240.0100.00017.08
8.0.230.0000.00717.08
8.0.220.0000.00717.17
8.0.210.0000.00817.02
8.0.200.0030.00317.11
8.0.190.0050.00217.07
8.0.180.0000.00717.12
8.0.170.0030.00617.14
8.0.160.0040.00417.00
8.0.150.0030.00616.93
8.0.140.0090.00016.94
8.0.130.0000.00513.44
8.0.120.0030.00517.11
8.0.110.0040.00416.99
8.0.100.0070.00017.08
8.0.90.0040.00417.10
8.0.80.0030.01217.07
8.0.70.0040.00416.99
8.0.60.0040.00417.03
8.0.50.0050.00417.05
8.0.30.0110.00417.33
8.0.20.0140.00816.94
8.0.10.0040.00417.27
8.0.00.0080.00916.81
7.4.330.0030.00313.16
7.4.320.0030.00316.84
7.4.300.0030.00316.68
7.4.290.0070.00316.72
7.4.280.0070.00016.61
7.4.270.0100.00016.73
7.4.260.0030.00313.34
7.4.250.0030.00616.75
7.4.240.0050.00316.77
7.4.230.0030.00316.84
7.4.220.0110.02016.79
7.4.210.0030.01716.79
7.4.200.0000.00716.82
7.4.190.0090.00016.67
7.4.160.0160.00716.60
7.4.150.0070.01017.01
7.4.140.0130.01217.86
7.4.130.0030.01716.78
7.4.120.0100.00716.79
7.4.110.0090.00916.67
7.4.100.0060.00916.82
7.4.90.0120.01216.68
7.4.80.0150.00916.64
7.4.70.0130.00316.67
7.4.60.0060.01016.79
7.4.50.0060.00316.57
7.4.40.0040.01116.88
7.4.30.0140.00416.70
7.4.00.0030.01015.11
7.3.330.0000.00613.43
7.3.320.0060.00313.56
7.3.310.0040.00416.66
7.3.300.0060.00016.48
7.3.290.0090.00816.54
7.3.280.0070.01316.50
7.3.270.0110.00516.59
7.3.260.0060.01916.55
7.3.240.0120.00416.58
7.3.230.0130.01016.68
7.3.210.0000.01716.82
7.3.200.0060.01016.73
7.3.190.0120.00316.62
7.3.180.0070.01016.62
7.3.170.0060.02016.46
7.3.160.0060.01316.54
7.3.120.0160.00014.95
7.2.330.0190.00016.87
7.2.320.0070.01116.88
7.2.310.0070.01316.92
7.2.300.0110.00716.73
7.2.290.0070.01016.92
7.1.70.0090.00016.99
7.1.60.0140.01019.25
7.1.50.0060.00617.10
7.1.00.0000.04322.50
7.0.200.0060.00916.65
7.0.140.0100.06022.20
7.0.120.0000.06722.19
7.0.60.0000.04319.96
7.0.50.0070.07717.97
7.0.40.0000.04320.44
7.0.30.0070.03720.25
7.0.20.0000.05020.47
7.0.10.0000.04720.18
7.0.00.0030.04020.39
5.6.280.0000.07321.02
5.6.210.0070.08720.69
5.6.200.0070.08318.38
5.6.190.0000.04320.54
5.6.180.0000.04020.74
5.6.170.0030.06020.50
5.6.160.0030.04020.55
5.6.150.0070.04020.39
5.6.140.0000.04320.25
5.6.130.0000.04320.25
5.6.120.0100.03320.27
5.6.110.0000.04720.53
5.6.100.0030.04020.63
5.6.90.0000.04320.29
5.6.80.0030.03719.70
5.6.70.0000.04020.01
5.6.60.0030.03719.97
5.6.50.0000.04020.03
5.6.40.0070.07319.84
5.6.30.0030.07020.00
5.6.20.0270.05019.95
5.6.10.0030.07019.89
5.6.00.0100.07319.62
5.5.350.0400.06720.35
5.5.340.0070.04317.99
5.5.330.0070.03720.21
5.5.320.0070.03720.33
5.5.310.0070.06720.39
5.5.300.0000.04320.21
5.5.290.0030.04020.04
5.5.280.0030.04720.43
5.5.270.0030.03720.19
5.5.260.0030.03720.38
5.5.250.0270.02320.15
5.5.240.0030.03719.83
5.5.230.0000.04019.42
5.5.220.0030.03719.74
5.5.210.0000.04019.49
5.5.200.0070.04019.46
5.5.190.0130.07319.63
5.5.180.0100.04019.42
5.5.160.0000.04319.74
5.5.150.0000.08719.39
5.5.140.0070.04719.46
5.5.130.0100.06319.79
5.5.120.0030.07719.62
5.5.110.0030.06719.45
5.5.100.0030.06719.65
5.5.90.0000.04319.32
5.5.80.0030.05319.49
5.5.70.0000.06319.69
5.5.60.0000.08319.36
5.5.50.0030.04319.29
5.5.40.0000.04019.63
5.5.30.0030.04319.50
5.5.20.0000.04719.27
5.5.10.0030.05719.41
5.5.00.0000.04719.48
5.4.450.0000.04019.61
5.4.440.0070.03319.77
5.4.430.0000.04019.51
5.4.420.0030.03719.47
5.4.410.0000.03719.35
5.4.400.0000.03719.23
5.4.390.0000.04019.05
5.4.380.0000.04019.38
5.4.370.0030.03319.38
5.4.360.0030.05019.08
5.4.350.0270.05018.95
5.4.340.0030.05719.22
5.4.320.0030.06719.39
5.4.310.0000.04319.28
5.4.300.0100.06019.07
5.4.290.0000.05319.23
5.4.280.0230.05018.95
5.4.270.0030.05719.35
5.4.260.0030.07319.06
5.4.250.0030.06319.43
5.4.240.0070.06719.14
5.4.230.0030.04319.18
5.4.220.0070.03319.21
5.4.210.0000.07318.92
5.4.200.0030.03718.96
5.4.190.0030.08019.21
5.4.180.0030.05719.37
5.4.170.0130.03719.18
5.4.160.0070.07019.20
5.4.150.0000.06019.42
5.4.140.0070.04016.52
5.4.130.0070.07016.66
5.4.120.0000.07016.62
5.4.110.0070.06316.64
5.4.100.0030.06316.58
5.4.90.0000.06716.47
5.4.80.0030.07016.57
5.4.70.0070.06016.56
5.4.60.0000.07316.58
5.4.50.0000.04316.77
5.4.40.0000.07316.70
5.4.30.0070.06316.43
5.4.20.0070.03016.57
5.4.10.0000.03716.50
5.4.00.0030.03316.02
5.3.290.0030.05014.86
5.3.280.0000.04014.72
5.3.270.0030.07714.75
5.3.260.0070.05714.80
5.3.250.0300.05014.81
5.3.240.0030.07714.75
5.3.230.0000.06014.74
5.3.220.0030.03314.67
5.3.210.0030.06314.71
5.3.200.0030.08014.69
5.3.190.0030.08014.59
5.3.180.0000.08014.66
5.3.170.0200.03314.66
5.3.160.0070.07014.70
5.3.150.0100.05314.69
5.3.140.0000.04014.57
5.3.130.0000.06714.64
5.3.120.0030.04714.66
5.3.110.0000.04014.64
5.3.100.0000.04314.17
5.3.90.0100.06714.12
5.3.80.0030.06014.16
5.3.70.0000.05714.04
5.3.60.0000.04714.03
5.3.50.0030.07314.04
5.3.40.0000.07714.09
5.3.30.0070.07014.09
5.3.20.0070.07313.82
5.3.10.0070.04313.79
5.3.00.0070.04713.74
5.2.170.0070.04713.11
5.2.160.0100.03013.11
5.2.150.0030.04713.11
5.2.140.0030.06313.11
5.2.130.0000.06313.11
5.2.120.0000.04313.11
5.2.110.0000.03713.11
5.2.100.0030.06313.11
5.2.90.0030.06713.11
5.2.80.0000.06313.11
5.2.70.0070.02713.11
5.2.60.0000.06313.11
5.2.50.0030.06713.11
5.2.40.0030.05013.11
5.2.30.0070.04713.11
5.2.20.0030.03313.11
5.2.10.0030.03713.11
5.2.00.0030.06013.11
5.1.60.0030.02313.11
5.1.50.0000.03013.11
5.1.40.0000.05713.11
5.1.30.0000.05713.11
5.1.20.0000.05713.11
5.1.10.0030.03713.11
5.1.00.0070.02713.11
5.0.50.0000.02313.11
5.0.40.0000.04713.11
5.0.30.0070.05013.11
5.0.20.0070.03013.11
5.0.10.0030.04713.11
5.0.00.0070.06313.11
4.4.90.0070.03013.11
4.4.80.0000.03313.11
4.4.70.0000.02313.11
4.4.60.0030.01713.11
4.4.50.0000.02313.11
4.4.40.0070.02713.11
4.4.30.0000.01713.11
4.4.20.0000.02713.11
4.4.10.0030.03313.11
4.4.00.0000.03013.11
4.3.110.0000.03013.11
4.3.100.0070.03013.11
4.3.90.0030.03313.11
4.3.80.0000.05713.11
4.3.70.0030.03313.11
4.3.60.0000.03313.11
4.3.50.0070.03013.11
4.3.40.0000.05713.11
4.3.30.0070.03013.11
4.3.20.0030.03713.11
4.3.10.0030.03313.11
4.3.00.0000.03313.11

preferences:
47.54 ms | 401 KiB | 5 Q