3v4l.org

run code in 300+ PHP versions simultaneously
$xml = simplexml_load_string("<?xml version='1.0' ?> <ImageSets> <ImageSet Category='primary'> <SwatchImage> <URL>www.url.jpg</URL> </SwatchImage> </ImageSet> </ImageSets> "); $primary_url = ''; foreach ($xml->ImageSet as $set) { if ($set->attributes()->Category == 'primary') { $primary_url = $set->SwatchImage->URL; break; } } echo $primary_url;

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.0150.00618.31
8.3.50.0070.01221.99
8.3.40.0130.00318.71
8.3.30.0120.00318.65
8.3.20.0040.00418.61
8.3.10.0100.00020.35
8.3.00.0070.00021.80
8.2.180.0140.00316.63
8.2.170.0200.00022.96
8.2.160.0100.00320.52
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00419.23
8.2.110.0090.00021.03
8.2.100.0070.00417.59
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0030.00517.91
8.2.50.0000.00818.07
8.2.40.0040.00417.99
8.2.30.0070.00317.93
8.2.20.0000.00717.52
8.2.10.0040.00417.48
8.2.00.0000.01017.59
8.1.280.0140.00025.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.29
8.1.230.0060.00620.95
8.1.220.0090.00018.77
8.1.210.0030.00618.77
8.1.200.0030.00616.88
8.1.190.0000.00817.26
8.1.180.0040.00418.10
8.1.170.0000.00818.57
8.1.160.0000.00718.68
8.1.150.0050.00218.49
8.1.140.0070.00017.32
8.1.130.0070.00017.75
8.1.120.0060.00317.40
8.1.110.0000.00817.35
8.1.100.0030.00617.33
8.1.90.0030.00517.39
8.1.80.0050.00317.29
8.1.70.0030.00317.30
8.1.60.0000.00817.45
8.1.50.0040.00417.30
8.1.40.0070.00017.34
8.1.30.0040.00417.52
8.1.20.0000.00817.35
8.1.10.0000.00817.30
8.1.00.0000.00717.38
8.0.300.0000.00720.04
8.0.290.0000.00716.63
8.0.280.0000.00718.24
8.0.270.0000.00717.23
8.0.260.0000.00616.74
8.0.250.0040.00416.83
8.0.240.0000.00816.82
8.0.230.0000.00716.78
8.0.220.0060.00016.76
8.0.210.0000.00716.64
8.0.200.0030.00316.83
8.0.190.0080.00016.83
8.0.180.0000.00716.67
8.0.170.0030.00616.73
8.0.160.0000.00716.81
8.0.150.0030.00616.79
8.0.140.0040.00416.70
8.0.130.0030.00313.39
8.0.120.0040.00416.66
8.0.110.0040.00416.78
8.0.100.0040.00416.62
8.0.90.0030.00616.71
8.0.80.0100.00716.64
8.0.70.0000.00816.82
8.0.60.0000.00716.77
8.0.50.0070.00016.63
8.0.30.0080.01017.00
8.0.20.0150.00517.40
8.0.10.0080.00016.77
8.0.00.0080.01016.52
7.4.330.0070.00013.43
7.4.320.0070.00016.46
7.4.300.0000.00616.38
7.4.290.0020.00516.46
7.4.280.0000.00816.48
7.4.270.0040.00316.29
7.4.260.0030.00313.24
7.4.250.0040.00416.34
7.4.240.0030.00316.35
7.4.230.0070.00016.45
7.4.220.0100.01416.40
7.4.210.0040.00916.34
7.4.200.0070.00016.46
7.4.190.0070.00016.51
7.4.160.0100.00716.33
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0110.00716.46
7.4.120.0080.01016.44
7.4.110.0060.01016.41
7.4.100.0030.01716.28
7.4.90.0100.00716.41
7.4.80.0070.01019.04
7.4.70.0130.00516.42
7.4.60.0040.01216.16
7.4.50.0050.00316.44
7.4.40.0030.01522.27
7.4.30.0120.00916.54
7.3.330.0060.00013.10
7.3.320.0050.00013.18
7.3.310.0000.00716.18
7.3.300.0040.00416.08
7.3.290.0090.00916.18
7.3.280.0070.00816.13
7.3.270.0220.00017.40
7.3.260.0040.01218.24
7.3.250.0110.01216.22
7.3.240.0080.00816.53
7.3.230.0070.01016.39
7.3.210.0090.01016.22
7.3.200.0040.01219.39
7.3.190.0090.01316.30
7.3.180.0120.00316.28
7.3.170.0060.01216.39
7.3.160.0120.00316.02
7.2.330.0090.00916.38
7.2.320.0140.00816.46
7.2.310.0120.00916.47
7.2.300.0060.01116.52
7.2.290.0150.00716.20
5.5.00.0030.03717.30
5.4.170.0030.03719.09
5.4.160.0000.04719.03
5.4.150.0070.04319.11
5.4.140.0030.04316.41
5.4.130.0030.04716.44
5.4.120.0070.03716.39
5.4.110.0000.03716.40
5.4.100.0000.03716.41
5.4.90.0030.03316.46
5.4.80.0000.04016.54
5.4.70.0000.03716.41
5.4.60.0000.03716.33
5.4.50.0070.04016.42
5.4.40.0000.03716.52
5.4.30.0000.03716.28
5.4.20.0000.03716.44
5.4.10.0000.05016.53
5.4.00.0030.03315.70
5.3.290.0100.07314.63
5.3.280.0170.06014.56
5.3.270.0100.03014.43
5.3.260.0070.03314.68
5.3.250.0070.04014.59
5.3.240.0070.07714.43
5.3.230.0070.07314.56
5.3.220.0070.04014.53
5.3.210.0000.04014.34
5.3.200.0130.03014.64
5.3.190.0000.04014.41
5.3.180.0000.04014.54
5.3.170.0000.04014.47
5.3.160.0000.04014.41
5.3.150.0000.04014.52
5.3.140.0030.03714.51
5.3.130.0070.03314.33
5.3.120.0030.04314.48
5.3.110.0030.03714.37
5.3.100.0000.03713.99
5.3.90.0070.03013.87
5.3.80.0070.03013.93
5.3.70.0070.03713.96
5.3.60.0030.03713.96
5.3.50.0030.03314.02
5.3.40.0070.03013.93
5.3.30.0070.03013.69
5.3.20.0000.03713.61
5.3.10.0030.04713.61
5.3.00.0030.03713.58

preferences:
38.65 ms | 401 KiB | 5 Q