3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <a> <foo name="one" game="lonely">1</foo> </a> XML; $xml = simplexml_load_string($string); if(!empty($xml->foo[0]->attributes())){ foreach($xml->foo[0]->attributes() as $a => $b) { echo $a,'="',$b,"\"\n"; } } ?>

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.130.0050.00318.68
8.3.120.0110.00719.28
8.3.110.0050.00320.94
8.3.100.0060.00316.59
8.3.90.0140.00426.77
8.3.80.0060.00317.97
8.3.70.0110.00718.54
8.3.60.0060.01318.81
8.3.50.0110.00918.66
8.3.40.0100.01319.17
8.3.30.0140.00419.01
8.3.20.0040.00418.85
8.3.10.0040.00422.10
8.3.00.0000.00821.01
8.2.250.0120.00317.13
8.2.240.0110.00017.24
8.2.230.0060.00322.58
8.2.220.0050.00524.06
8.2.210.0040.00426.77
8.2.200.0000.01118.55
8.2.190.0040.01116.64
8.2.180.0150.00618.41
8.2.170.0030.01422.96
8.2.160.0060.00921.36
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.09
8.2.110.0060.00321.31
8.2.100.0070.00418.03
8.2.90.0000.00818.28
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0060.00318.28
8.2.50.0080.00018.07
8.2.40.0000.00818.41
8.2.30.0000.00718.20
8.2.20.0060.00318.39
8.2.10.0040.00418.38
8.2.00.0040.00417.90
8.1.300.0060.00320.34
8.1.290.0030.00930.84
8.1.280.0090.01325.92
8.1.270.0080.00018.96
8.1.260.0030.00626.35
8.1.250.0140.00028.09
8.1.240.0030.00622.39
8.1.230.0000.01121.18
8.1.220.0080.00018.03
8.1.210.0000.00818.91
8.1.200.0060.00317.48
8.1.190.0030.00617.25
8.1.180.0080.00018.10
8.1.170.0040.00418.68
8.1.160.0000.00719.09
8.1.150.0000.00719.06
8.1.140.0000.00722.22
8.1.130.0030.00320.23
8.1.120.0000.00717.59
8.1.110.0030.00617.70
8.1.100.0010.00817.58
8.1.90.0070.00417.62
8.1.80.0040.00517.62
8.1.70.0020.00717.61
8.1.60.0050.00417.69
8.1.50.0030.00717.63
8.1.40.0080.00117.66
8.1.30.0030.00617.78
8.1.20.0040.00417.72
8.1.10.0040.00517.75
8.1.00.0050.00817.77
8.0.300.0060.00320.15
8.0.290.0000.00817.13
8.0.280.0030.00318.54
8.0.270.0030.00317.46
8.0.260.0000.00718.54
8.0.250.0030.00317.09
8.0.240.0030.00317.19
8.0.230.0060.00617.16
8.0.220.0100.00117.11
8.0.210.0020.00917.17
8.0.200.0060.00517.23
8.0.190.0080.00317.19
8.0.180.0030.00917.14
8.0.170.0050.00617.16
8.0.160.0070.00417.13
8.0.150.0090.00217.07
8.0.140.0000.01117.13
8.0.130.0050.00515.29
8.0.120.0040.00717.04
8.0.110.0050.00617.12
8.0.100.0050.00517.10
8.0.90.0050.00617.01
8.0.80.0080.00717.19
8.0.70.0040.00717.16
8.0.60.0000.01117.20
8.0.50.0040.00717.08
8.0.30.0080.00917.22
8.0.20.0080.01217.22
8.0.10.0060.00517.17
8.0.00.0110.00716.88
7.4.330.0000.00515.55
7.4.320.0000.00616.66
7.4.300.0020.00716.75
7.4.290.0080.00416.71
7.4.280.0120.00016.78
7.4.270.0060.00716.66
7.4.260.0080.00316.78
7.4.250.0090.00216.75
7.4.240.0050.00716.76
7.4.230.0040.00616.71
7.4.220.0060.00416.88
7.4.210.0110.00716.80
7.4.200.0060.00516.61
7.4.190.0120.00416.82
7.4.180.0130.00016.78
7.4.160.0110.00516.68
7.4.150.0120.00316.64
7.4.140.0100.01017.65
7.4.130.0090.00816.63
7.4.120.0110.00816.72
7.4.110.0120.00416.67
7.4.100.0090.00816.67
7.4.90.0080.00716.74
7.4.80.0060.01017.91
7.4.70.0080.00616.60
7.4.60.0070.00716.63
7.4.50.0050.00816.52
7.4.40.0070.00816.68
7.4.30.0070.00716.61
7.4.20.0130.00016.47
7.4.10.0110.00016.50
7.4.00.0060.00715.76
7.3.330.0080.00215.03
7.3.320.0050.00615.04
7.3.310.0100.00216.51
7.3.300.0100.00216.46
7.3.290.0050.00516.44
7.3.280.0050.01116.58
7.3.270.0150.00016.64
7.3.260.0110.01016.66
7.3.250.0070.00716.66
7.3.240.0100.00716.59
7.3.230.0080.00816.65
7.3.220.0100.00316.64
7.3.210.0080.00716.63
7.3.200.0090.01016.52
7.3.190.0130.00916.52
7.3.180.0100.00816.76
7.3.170.0110.00416.55
7.3.160.0080.00816.67
7.3.150.0090.00516.47
7.3.140.0060.00816.41
7.3.130.0130.00316.37
7.3.120.0100.00316.34
7.3.110.0130.00316.26
7.3.100.0110.00316.28
7.3.90.0090.00516.76
7.3.80.0070.00716.46
7.3.70.0130.00316.41
7.3.60.0120.00316.45
7.3.50.0100.00316.70
7.3.40.0120.00316.72
7.3.30.0100.00516.71
7.3.20.0110.00318.43
7.3.10.0110.00318.46
7.3.00.0130.00218.23
7.2.340.0070.00716.68
7.2.330.0100.00716.67
7.2.320.0100.00716.81
7.2.310.0080.00816.64
7.2.300.0100.00416.60
7.2.290.0080.00816.83
7.2.280.0070.00716.70
7.2.270.0070.00716.42
7.2.260.0100.00516.47
7.2.250.0100.00516.61
7.2.240.0100.00516.67
7.2.230.0090.00516.65
7.2.220.0110.00316.45
7.2.210.0120.00416.66
7.2.200.0150.00216.66
7.2.190.0140.00016.82
7.2.180.0130.00216.54
7.2.170.0100.00316.63
7.2.160.0050.00916.86
7.2.150.0090.00618.54
7.2.140.0070.00718.71
7.2.130.0110.00418.55
7.2.120.0070.00718.82
7.2.110.0160.00516.65
7.2.100.0120.00316.80
7.2.90.0120.00916.84
7.2.80.0220.00816.69
7.2.70.0230.00616.87
7.2.60.0130.00817.00
7.2.50.0110.00416.95
7.2.40.0090.00716.94
7.2.30.0290.00017.01
7.2.20.0200.00716.68
7.2.10.0150.00716.98
7.2.00.0160.00716.90
7.1.330.0090.00417.59
7.1.320.0090.00517.52
7.1.310.0080.00517.35
7.1.300.0110.00217.44
7.1.290.0130.00017.42
7.1.280.0110.00617.60
7.1.270.0100.00317.36
7.1.260.0040.00917.58
7.1.250.0090.00617.50
7.1.240.0100.00517.52
7.1.230.0160.00315.86
7.1.220.0170.00615.80
7.1.210.0160.00415.62
7.1.200.0240.00415.75
7.1.190.0200.00615.69
7.1.180.0200.00315.56
7.1.170.0150.00715.79
7.1.160.0240.00615.66
7.1.150.0130.00815.66
7.1.140.0260.00215.70
7.1.130.0470.00715.77
7.1.120.0220.00215.76
7.1.110.0150.00615.78
7.1.100.0160.00515.62
7.1.90.0170.00615.62
7.1.80.0200.00315.59
7.1.70.0200.00515.49
7.1.60.0240.00724.79
7.1.50.0290.00424.60
7.1.40.0260.01124.84
7.1.30.0310.00424.64
7.1.20.0260.00824.45
7.1.10.0180.00815.75
7.1.00.0220.00115.63
7.0.330.0160.00016.98
7.0.320.0070.00717.05
7.0.310.0100.00317.17
7.0.300.0110.00617.23
7.0.290.0090.00517.28
7.0.280.0070.00717.24
7.0.270.0050.00917.25
7.0.260.0090.00517.31
7.0.250.0000.01317.45
7.0.240.0040.00817.12
7.0.230.0040.00917.39
7.0.220.0110.00417.14
7.0.210.0080.00617.39
7.0.200.0040.00917.22
7.0.190.0070.00717.38
7.0.180.0060.00817.29
7.0.170.0130.00017.44
7.0.160.0100.00317.21
7.0.150.0130.00017.04
7.0.140.0130.00017.26
7.0.130.0100.00317.22
7.0.120.0100.00317.39
7.0.110.0000.01317.32
7.0.100.0100.00317.05
7.0.90.0080.00517.24
7.0.80.0070.00717.27
7.0.70.0100.00316.97
7.0.60.0130.00017.26
7.0.50.0090.00316.95
7.0.40.0140.00317.33
7.0.30.0090.00317.31
7.0.20.0110.00317.09
7.0.10.0090.00517.07
7.0.00.0100.00317.28
5.6.400.0090.00415.81
5.6.390.0070.00715.99
5.6.380.0070.00715.03
5.6.370.0080.00515.81
5.6.360.0130.00015.82
5.6.350.0000.01316.14
5.6.340.0130.00015.83
5.6.330.0130.00015.96
5.6.320.0110.00315.79
5.6.310.0130.00015.85
5.6.300.0070.00615.64
5.6.290.0080.00415.88
5.6.280.0130.00015.77
5.6.270.0110.00315.88
5.6.260.0030.01016.06
5.6.250.0130.00015.82
5.6.240.0130.00015.92
5.6.230.0100.00315.99
5.6.220.0090.00516.11
5.6.210.0140.00016.13
5.6.200.0110.00416.13
5.6.190.0040.00916.13
5.6.180.0090.00516.24
5.6.170.0100.00316.06
5.6.160.0070.00716.25
5.6.150.0130.00016.23
5.6.140.0080.00416.04
5.6.130.0130.00016.18
5.6.120.0090.00416.10
5.6.110.0030.01016.18
5.6.100.0090.00416.11
5.6.90.0140.00016.05
5.6.80.0130.00015.78
5.6.70.0130.00016.18
5.6.60.0000.01216.15
5.6.50.0060.00615.78
5.6.40.0130.00015.86
5.6.30.0060.00616.09
5.6.20.0080.00416.05
5.6.10.0000.01216.05
5.6.00.0070.00515.96

preferences:
30.91 ms | 403 KiB | 5 Q