3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA <Persons> <Person> <Address> <State> <Code>101</Code> </State> </Address> </Person> <Person> <Address> <State> <Code>101</Code> </State> <Phone> 123456789</Phone> </Address> </Person> </Persons> DATA; $items = simplexml_load_string($data); foreach ($items as $item) { echo $item->Address->State->Code; }

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.5.00.0110.01020.09
8.4.150.0030.00014.05
8.4.140.0130.00917.43
8.4.130.0110.01017.87
8.4.120.0110.00821.04
8.4.110.0110.01022.87
8.4.100.0130.00518.05
8.4.90.0050.00718.93
8.4.80.0090.00617.98
8.4.70.0080.01317.80
8.4.60.0120.00819.10
8.4.50.0120.00819.39
8.4.40.0130.00717.95
8.4.30.0180.00617.67
8.4.20.0070.01419.81
8.4.10.0100.01017.71
8.3.280.0140.00718.63
8.3.270.0060.01217.00
8.3.260.0120.00816.93
8.3.250.0110.00818.98
8.3.240.0090.01016.94
8.3.230.0090.00416.68
8.3.220.0080.01117.38
8.3.210.0130.00616.72
8.3.200.0090.00416.73
8.3.190.0090.00817.18
8.3.180.0090.01016.64
8.3.170.0130.00717.38
8.3.160.0040.00418.54
8.3.150.0120.00621.10
8.3.140.0080.00016.82
8.3.130.0040.00718.68
8.3.120.0080.00019.04
8.3.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0050.00526.77
8.3.80.0000.00918.38
8.3.70.0060.01216.63
8.3.60.0150.00418.68
8.3.50.0070.00718.51
8.3.40.0070.01018.96
8.3.30.0090.00618.96
8.3.20.0060.00319.39
8.3.10.0040.00422.10
8.3.00.0080.00023.91
8.2.290.0130.00620.82
8.2.280.0050.00518.54
8.2.270.0140.00419.20
8.2.260.0090.00018.41
8.2.250.0120.00618.39
8.2.240.0060.00319.33
8.2.230.0080.00022.58
8.2.220.0080.00037.54
8.2.210.0080.00026.77
8.2.200.0030.00618.88
8.2.190.0120.00316.88
8.2.180.0210.00716.75
8.2.170.0070.01422.96
8.2.160.0070.00719.53
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0110.00720.63
8.2.120.0070.00026.35
8.2.110.0100.00022.51
8.2.100.0080.00417.91
8.2.90.0000.00918.09
8.2.80.0060.00318.14
8.2.70.0060.00318.16
8.2.60.0090.00018.41
8.2.50.0060.00318.10
8.2.40.0070.00019.60
8.2.30.0030.00519.57
8.2.20.0070.00018.15
8.2.10.0030.00518.32
8.2.00.0040.00419.62
8.1.330.0130.00522.48
8.1.320.0120.00716.10
8.1.310.0050.00316.76
8.1.300.0040.00416.59
8.1.290.0000.01030.84
8.1.280.0030.01225.92
8.1.270.0070.00320.52
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.36
8.1.230.0090.00322.87
8.1.220.0040.00417.89
8.1.210.0030.00518.79
8.1.200.0070.00317.47
8.1.190.0000.00917.35
8.1.180.0030.00518.10
8.1.170.0080.00018.77
8.1.160.0070.00019.07
8.1.150.0040.00419.20
8.1.140.0020.00517.95
8.1.130.0040.00419.28
8.1.120.0000.00817.55
8.1.110.0040.00417.57
8.1.100.0040.00417.63
8.1.90.0000.00817.66
8.1.80.0070.00017.62
8.1.70.0030.00317.57
8.1.60.0000.00817.66
8.1.50.0000.00817.63
8.1.40.0060.00317.80
8.1.30.0030.00517.73
8.1.20.0000.00817.82
8.1.10.0040.00417.65
8.1.00.0000.00817.64
8.0.300.0050.00219.90
8.0.290.0040.00417.00
8.0.280.0050.00218.55
8.0.270.0060.00317.07
8.0.260.0030.00317.35
8.0.250.0040.00317.26
8.0.240.0000.00717.18
8.0.230.0080.00017.15
8.0.220.0060.00317.02
8.0.210.0040.00417.21
8.0.200.0030.00317.11
8.0.190.0030.00317.12
8.0.180.0060.00317.10
8.0.170.0000.00917.05
8.0.160.0040.00417.21
8.0.150.0050.00317.00
8.0.140.0000.00717.08
8.0.130.0060.00013.66
8.0.120.0040.00417.13
8.0.110.0000.00717.19
8.0.100.0040.00417.02
8.0.90.0040.00417.18
8.0.80.0040.01017.23
8.0.70.0000.00717.03
8.0.60.0050.00216.95
8.0.50.0040.00417.07
8.0.30.0130.00417.28
8.0.20.0120.00817.40
8.0.10.0030.00517.25
8.0.00.0170.00217.07
7.4.330.0000.00415.55
7.4.320.0060.00016.70
7.4.300.0030.00316.72
7.4.290.0030.00316.59
7.4.280.0040.00416.66
7.4.270.0040.00416.70
7.4.260.0040.00316.64
7.4.250.0030.00316.77
7.4.240.0000.00716.82
7.4.230.0000.00716.56
7.4.220.0040.00416.71
7.4.210.0110.00516.77
7.4.200.0000.00716.87
7.4.160.0150.00516.64
7.4.140.0130.00617.86
7.4.130.0070.01016.72
7.4.120.0100.01016.77
7.4.110.0140.01216.84
7.4.100.0130.00316.80
7.4.90.0150.00616.82
7.4.80.0060.01819.39
7.4.70.0070.01016.73
7.4.60.0090.01416.52
7.4.50.0090.00616.73
7.4.40.0060.01116.80
7.4.00.0070.01015.09
7.3.330.0050.00013.37
7.3.320.0050.00013.37
7.3.310.0070.00016.35
7.3.300.0050.00316.40
7.3.290.0000.00716.48
7.3.280.0080.00816.55
7.3.260.0080.01016.61
7.3.240.0080.01116.69
7.3.230.0140.00316.77
7.3.210.0030.01516.44
7.3.200.0030.01316.79
7.3.190.0120.00616.60
7.3.180.0110.00616.70
7.3.170.0080.00816.60
7.3.160.0030.01316.75
7.2.330.0080.00816.72
7.2.320.0100.00716.86
7.2.310.0030.01516.81
7.2.300.0080.01116.87
7.2.290.0060.01016.76
7.2.70.0610.01315.29
7.2.60.0780.00615.37
7.2.50.0690.00615.54
7.2.40.0590.00315.12
7.2.30.0500.01015.29
7.2.20.0580.01314.92
7.2.10.0610.00915.28
7.2.00.0620.00315.11
7.1.200.0040.01215.68
7.1.170.0600.00713.93
7.1.160.0530.01014.20
7.1.150.0580.00314.00
7.1.140.0820.00314.10
7.1.130.0580.00614.00
7.1.120.0540.01014.27
7.1.110.0570.00913.80
7.1.100.0680.01014.04
7.1.90.0720.00614.06
7.1.80.0660.01013.96
7.1.70.0770.00313.98
7.1.60.0970.01031.85
7.1.50.1050.01032.03
7.1.40.0920.01032.04
7.1.30.0890.01631.83
7.1.20.1100.00632.20
7.1.10.0870.00013.94
7.1.00.0920.00613.96

preferences:
36.7 ms | 403 KiB | 5 Q