3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <url xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <loc>https://www.example.com/ca/en/cat/categories/series/07660/</loc> <lastmod>2018-11-07</lastmod> <changefreq>daily</changefreq> <priority>1.0</priority> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-ae" href="https://www.example.com/ae/en/cat/categories/series/07660/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="de-at" href="https://www.example.com/at/de/cat/07660/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-au" href="https://www.example.com/au/en/cat/categories/series/07660/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-ca" href="https://www.example.com/ca/en/cat/categories/series/07660/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="fr-ca" href="https://www.example.com/ca/fr/cat/categories/series/07660/" /> </url> <url xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <loc>https://www.example.com/ca/en/cat/categories/series/07683/</loc> <lastmod>2018-11-07</lastmod> <changefreq>daily</changefreq> <priority>1.0</priority> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-ae" href="https://www.example.com/ae/en/cat/categories/series/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="de-at" href="https://www.example.com/at/de/cat/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-au" href="https://www.example.com/au/en/cat/categories/series/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="fr-be" href="https://www.example.com/be/fr/collections/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="nl-be" href="https://www.example.com/be/nl/collecties/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-bh" href="https://www.example.com/bh/en/cat/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en-ca" href="https://www.example.com/ca/en/cat/categories/series/07683/" /> <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="fr-ca" href="https://www.example.com/ca/fr/cat/categories/sies/07683/" /> </url> </urlset>'; $tags = explode("<", $xml); $loc = "not found"; $frhref = "not found"; foreach ($tags as $tag){ if(strpos($tag, "loc>") === 0){ $loc = substr($tag, 4); } if(strpos($tag, "xhtml:link") === 0){ $at = strpos($tag, "hreflang") + 9; $lang = substr($tag, $at, 7); if($lang == '"fr-ca"'){ $at = strpos($tag, "href=") + 6; $_href = substr($tag, $at); $until = strpos($_href, '"'); $frhref = substr($_href, 0, $until); } } } echo $loc, " \n\r"; echo $frhref;

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.0130.00819.89
8.4.150.0010.00114.05
8.4.140.0160.00517.23
8.4.130.0100.01017.88
8.4.120.0120.00822.24
8.4.110.0060.00422.43
8.4.100.0140.00620.63
8.4.90.0140.00820.71
8.4.80.0060.00417.71
8.4.70.0120.00917.97
8.4.60.0130.01019.05
8.4.50.0110.00920.22
8.4.40.0100.01319.22
8.4.30.0160.00417.78
8.4.20.0070.01320.43
8.4.10.0030.00619.47
8.3.280.0110.01018.29
8.3.270.0120.00716.57
8.3.260.0120.00716.44
8.3.250.0050.00618.82
8.3.240.0100.00918.92
8.3.230.0110.00616.57
8.3.220.0070.00217.10
8.3.210.0040.00316.54
8.3.200.0060.00316.22
8.3.190.0090.01017.23
8.3.180.0110.00816.26
8.3.170.0040.01517.23
8.3.160.0060.00316.57
8.3.150.0090.00918.96
8.3.140.0110.00719.02
8.3.130.0030.00616.63
8.3.120.0130.00318.84
8.3.110.0050.00220.94
8.3.100.0030.00624.06
8.3.90.0110.00426.77
8.3.80.0040.00416.50
8.3.70.0150.00716.75
8.3.60.0110.00716.75
8.3.50.0110.00318.18
8.3.40.0090.00618.57
8.3.30.0070.00718.65
8.3.20.0050.00321.73
8.3.10.0060.00320.21
8.3.00.0080.00019.26
8.2.290.0120.00520.45
8.2.280.0150.00518.16
8.2.270.0070.01117.38
8.2.260.0060.01015.98
8.2.250.0000.00918.19
8.2.240.0070.01317.06
8.2.230.0060.00322.58
8.2.220.0040.00437.54
8.2.210.0000.00826.77
8.2.200.0000.00818.16
8.2.190.0140.00716.58
8.2.180.0110.01118.16
8.2.170.0150.00022.96
8.2.160.0070.00719.42
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00420.35
8.2.120.0050.00226.35
8.2.110.0040.00419.04
8.2.100.0000.01218.16
8.2.90.0050.00317.63
8.2.80.0040.00417.97
8.2.70.0080.00018.03
8.2.60.0080.00018.09
8.2.50.0080.00018.22
8.2.40.0040.00719.30
8.2.30.0040.00419.36
8.2.20.0000.00818.12
8.2.10.0040.00419.38
8.2.00.0000.00718.14
8.1.330.0110.00822.18
8.1.320.0110.00816.02
8.1.310.0110.00718.61
8.1.300.0090.00017.87
8.1.290.0000.00918.88
8.1.280.0160.00325.92
8.1.270.0060.00320.25
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0040.00421.29
8.1.230.0060.00622.63
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0000.00817.23
8.1.180.0040.00718.10
8.1.170.0060.00318.49
8.1.160.0040.00418.97
8.1.150.0040.00418.90
8.1.140.0000.00820.25
8.1.130.0030.00320.27
8.1.120.0040.00417.43
8.1.110.0030.00617.45
8.1.100.0030.00617.37
8.1.90.0000.00717.41
8.1.80.0020.00517.44
8.1.70.0050.00317.50
8.1.60.0040.00417.50
8.1.50.0000.00817.43
8.1.40.0050.00217.57
8.1.30.0030.00617.67
8.1.20.0080.00017.65
8.1.10.0000.00817.52
8.1.00.0000.00817.45
8.0.300.0070.00018.77
8.0.290.0060.00316.63
8.0.280.0040.00318.52
8.0.270.0040.00417.18
8.0.260.0030.00318.51
8.0.250.0030.00317.00
8.0.240.0000.00716.90
8.0.230.0000.00716.97
8.0.220.0000.00716.95
8.0.210.0000.00716.86
8.0.200.0000.00616.87
8.0.190.0040.00416.98
8.0.180.0000.00916.94
8.0.170.0040.00417.00
8.0.160.0040.00416.90
8.0.150.0040.00416.77
8.0.140.0040.00416.88
8.0.130.0000.00613.27
8.0.120.0050.00316.77
8.0.110.0040.00416.81
8.0.100.0080.00016.90
8.0.90.0000.00816.72
8.0.80.0100.00616.96
8.0.70.0030.00316.77
8.0.60.0040.00416.92
8.0.50.0040.00416.91
8.0.30.0100.00817.05
8.0.20.0130.00617.19
8.0.10.0040.00416.89
8.0.00.0120.00816.89
7.4.330.0030.00315.55
7.4.320.0040.00416.52
7.4.300.0000.00716.60
7.4.290.0030.00316.62
7.4.280.0050.00216.50
7.4.270.0050.00216.63
7.4.260.0080.00316.62
7.4.250.0070.00016.50
7.4.240.0000.00816.44
7.4.230.0030.00316.72
7.4.220.0060.00316.46
7.4.210.0110.00416.60
7.4.200.0060.00316.27
7.4.160.0100.00816.63
7.4.140.0080.01517.86
7.4.130.0060.01216.48
7.4.120.0120.00616.43
7.4.110.0070.01016.40
7.4.100.0160.00316.52
7.4.90.0140.00316.52
7.4.80.0090.01216.28
7.4.70.0100.00916.31
7.4.60.0090.01116.32
7.4.50.0170.00316.35
7.4.40.0200.00816.49
7.4.30.0180.00615.96
7.4.20.0110.01116.02
7.4.10.0230.01116.38
7.4.00.0080.01015.75
7.3.330.0000.00513.21
7.3.320.0060.00013.18
7.3.310.0000.00716.25
7.3.300.0030.00316.26
7.3.290.0070.00016.17
7.3.280.0080.00616.27
7.3.260.0110.00916.45
7.3.240.0110.00916.44
7.3.230.0030.01316.56
7.3.210.0060.01216.53
7.3.200.0150.00816.27
7.3.190.0070.01416.42
7.3.180.0090.00916.40
7.3.170.0130.00816.38
7.3.160.0120.00716.27
7.3.150.0240.01016.63
7.3.140.0310.00316.25
7.3.130.0220.01116.38
7.3.120.0210.01016.26
7.3.110.0170.01416.37
7.3.100.0200.01016.28
7.3.90.0190.01216.26
7.3.80.0230.01216.65
7.3.70.0310.00616.47
7.3.60.0300.00616.27
7.3.50.0280.00616.39
7.3.40.0170.01316.25
7.3.30.0200.01116.37
7.3.20.0470.00515.55
7.3.10.0380.00615.48
7.3.00.0400.00215.67
7.2.330.0070.01016.49
7.2.320.0110.01116.48
7.2.310.0190.01116.67
7.2.300.0160.00516.47
7.2.290.0110.00916.49
7.2.280.0080.02016.65
7.2.270.0160.01016.40
7.2.260.0190.01616.71
7.2.250.0240.00516.65
7.2.240.0250.00716.56
7.2.230.0360.00416.49
7.2.220.0300.01016.65
7.2.210.0250.01016.50
7.2.200.0250.01016.59
7.2.190.0200.01416.39
7.2.180.0150.01516.30
7.2.170.0280.01316.63
7.2.160.0190.01216.51
7.2.150.0380.00315.79
7.2.140.0360.00615.93
7.2.130.0440.01215.88
7.2.120.0370.00215.89
7.2.110.0370.00515.86
7.2.100.0360.00615.68
7.2.90.0400.00715.82
7.2.80.0480.00515.78
7.2.70.0410.00315.77
7.2.60.0480.00615.73
7.2.50.0360.00615.77
7.2.40.0300.01515.91
7.2.30.0340.00815.99
7.2.20.0330.01115.82
7.2.10.0350.00615.83
7.2.00.0390.00915.86
7.1.330.0160.01315.56
7.1.320.0220.00815.68
7.1.310.0200.01015.70
7.1.300.0250.00615.45
7.1.290.0260.00315.67
7.1.280.0190.01015.64
7.1.270.0270.00515.73
7.1.260.0200.01315.46
7.1.250.0270.01114.77
7.1.240.0230.00715.61
7.1.230.0250.00715.56
7.1.220.0310.00315.61
7.1.210.0170.01515.53
7.1.200.0230.00915.63
7.1.190.0300.00715.71
7.1.180.0280.00915.44
7.1.170.0230.00915.52
7.1.160.0280.00815.47
7.1.150.0230.00915.50
7.1.140.0290.00415.75
7.1.130.0190.01615.49
7.1.120.0170.01415.46
7.1.110.0190.01215.67
7.1.100.0260.01215.55
7.1.90.0250.00815.65
7.1.80.0230.00815.57
7.1.70.0230.01115.48
7.1.60.0240.01015.59
7.1.50.0310.00415.61
7.1.40.0300.00015.67
7.1.30.0360.01015.61
7.1.20.0180.01415.46
7.1.10.0400.00415.60
7.1.00.0260.00615.57
7.0.330.0180.00915.16
7.0.320.0190.00815.09
7.0.310.0180.00915.23
7.0.300.0240.00615.05
7.0.290.0200.01015.14
7.0.280.0310.00315.23
7.0.270.0270.01915.30
7.0.260.0130.01615.20
7.0.250.0200.01415.22
7.0.240.0170.01415.14
7.0.230.0250.00615.28
7.0.220.0300.00315.20
7.0.210.0220.01315.27
7.0.200.0280.01015.16
7.0.190.0190.01315.35
7.0.180.0220.00915.35
7.0.170.0180.01415.34
7.0.160.0300.00515.35
7.0.150.0220.01415.41
7.0.140.0130.01715.37
7.0.130.0160.01215.34
7.0.120.0250.01115.34
7.0.110.0140.01415.14
7.0.100.0000.02715.29
7.0.90.0220.00515.36
7.0.80.0180.00915.19
7.0.70.0250.00515.23
7.0.60.0300.00015.17
7.0.50.0200.01015.16
7.0.40.0210.00615.06
7.0.30.0220.01315.33
7.0.20.0180.01115.35
7.0.10.0210.01615.27
7.0.00.0350.00415.12
5.6.400.0210.01215.78
5.6.390.0200.01016.06
5.6.380.0250.01016.04
5.6.370.0210.01216.12
5.6.360.0260.00715.93
5.6.350.0190.01215.87
5.6.340.0240.01316.05
5.6.330.0170.01715.78
5.6.320.0300.00615.91
5.6.310.0160.01916.01
5.6.300.0240.01316.08
5.6.290.0240.01215.63
5.6.280.0210.01116.00
5.6.270.0240.00815.95
5.6.260.0110.01715.93
5.6.250.0200.01016.03
5.6.240.0160.01215.73
5.6.230.0180.01115.74
5.6.220.0220.01115.96
5.6.210.0170.01415.96
5.6.200.0110.01915.89
5.6.190.0140.01715.78
5.6.180.0210.00915.94
5.6.170.0190.01015.71
5.6.160.0160.01615.98
5.6.150.0160.01315.78
5.6.140.0230.00815.98
5.6.130.0210.01215.82
5.6.120.0220.01416.13
5.6.110.0250.00815.90
5.6.100.0200.01415.83
5.6.90.0160.01316.09
5.6.80.0200.01015.94
5.6.70.0220.01615.82
5.6.60.0220.00915.84
5.6.50.0140.01415.75
5.6.40.0200.01315.63
5.6.30.0230.00815.80
5.6.20.0150.01515.91
5.6.10.0210.00815.69
5.6.00.0160.01215.82
5.5.380.0150.01515.88
5.5.370.0170.01415.93
5.5.360.0140.01415.65
5.5.350.0230.00915.77
5.5.340.0230.00815.73
5.5.330.0200.01015.77
5.5.320.0270.00315.82
5.5.310.0240.00915.85
5.5.300.0260.00315.87
5.5.290.0240.01116.05
5.5.280.0170.01315.66
5.5.270.0160.01615.80
5.5.260.0170.01315.96
5.5.250.0240.00816.02
5.5.240.0160.01615.86
5.5.230.0150.01615.93
5.5.220.0270.00315.55
5.5.210.0100.01915.92
5.5.200.0230.00715.82
5.5.190.0120.02215.76
5.5.180.0190.00915.78
5.5.170.0170.01315.55
5.5.160.0220.01416.09
5.5.150.0210.01515.87
5.5.140.0190.01315.91
5.5.130.0250.00415.93
5.5.120.0110.01715.81
5.5.110.0150.01515.92
5.5.100.0260.00515.58
5.5.90.0130.01915.78
5.5.80.0220.01415.77
5.5.70.0160.01715.48
5.5.60.0170.01215.80
5.5.50.0140.01815.74
5.5.40.0200.00815.88
5.5.30.0120.01815.88
5.5.20.0240.00315.84
5.5.10.0250.00615.84
5.5.00.0200.01015.62
5.4.450.0130.01015.05
5.4.440.0200.00315.05
5.4.430.0180.00415.05
5.4.420.0240.00215.05
5.4.410.0180.00615.05
5.4.400.0160.01315.05
5.4.390.0240.00615.05
5.4.380.0130.01015.05
5.4.370.0170.00615.05
5.4.360.0190.00815.05
5.4.350.0170.00615.05
5.4.340.0130.00915.05
5.4.330.0160.00615.05
5.4.320.0150.00715.05
5.4.310.0100.02015.05
5.4.300.0140.00715.05
5.4.290.0110.01215.05
5.4.280.0050.01715.05
5.4.270.0150.01215.05
5.4.260.0120.01215.05
5.4.250.0180.00915.05
5.4.240.0180.00615.05
5.4.230.0140.00815.05
5.4.220.0130.01715.05
5.4.210.0130.00815.05
5.4.200.0190.00315.05
5.4.190.0190.00815.05
5.4.180.0120.01215.05
5.4.170.0220.00315.05
5.4.160.0230.00015.05
5.4.150.0150.00815.05
5.4.140.0170.00315.05
5.4.130.0130.00815.05
5.4.120.0090.01215.05
5.4.110.0160.01115.05
5.4.100.0150.00715.05
5.4.90.0140.00815.05
5.4.80.0120.00915.05
5.4.70.0190.00315.05
5.4.60.0170.01015.05
5.4.50.0070.01415.05
5.4.40.0220.00315.05
5.4.30.0170.00715.05
5.4.20.0210.00615.05
5.4.10.0090.01315.05
5.4.00.0130.01415.05
5.3.290.0170.01215.05
5.3.280.0170.01115.05
5.3.270.0110.01715.05
5.3.260.0180.00515.05
5.3.250.0170.00615.05
5.3.240.0110.01115.05
5.3.230.0160.00615.05
5.3.220.0120.01215.05
5.3.210.0110.01215.05
5.3.200.0110.01115.05
5.3.190.0130.01015.05
5.3.180.0190.00415.05
5.3.170.0250.00315.05
5.3.160.0140.00915.05
5.3.150.0230.00015.05
5.3.140.0170.01115.05
5.3.130.0150.01215.05
5.3.120.0110.01515.05
5.3.110.0160.00615.05
5.3.100.0210.00615.05
5.3.90.0130.01015.05
5.3.80.0180.00615.05
5.3.70.0120.01215.05
5.3.60.0090.01515.05
5.3.50.0240.00315.05
5.3.40.0200.00315.05
5.3.30.0150.01515.05
5.3.20.0180.01015.05
5.3.10.0180.00815.05
5.3.00.0140.01115.05
5.2.170.0140.00715.05
5.2.160.0200.00315.05
5.2.150.0140.01115.05
5.2.140.0080.01315.05
5.2.130.0120.01215.05
5.2.120.0130.01115.05
5.2.110.0170.00315.05
5.2.100.0130.01015.05
5.2.90.0110.01115.05
5.2.80.0180.00315.05
5.2.70.0120.00615.05
5.2.60.0070.01115.05
5.2.50.0160.00615.05
5.2.40.0040.01415.05
5.2.30.0100.01315.05
5.2.20.0090.00915.05
5.2.10.0190.00315.05
5.2.00.0130.01015.05
5.1.60.0140.00515.05
5.1.50.0100.00715.05
5.1.40.0110.00515.05
5.1.30.0090.00915.05
5.1.20.0180.00015.05
5.1.10.0110.00615.05
5.1.00.0110.00715.05
5.0.50.0140.00015.05
5.0.40.0110.00415.05
5.0.30.0080.00815.05
5.0.20.0110.00415.05
5.0.10.0140.00015.05
5.0.00.0130.00015.05
4.4.90.0070.00215.05
4.4.80.0070.00215.05
4.4.70.0030.00615.05
4.4.60.0030.00615.05
4.4.50.0000.00815.05
4.4.40.0050.00515.05
4.4.30.0000.01015.05
4.4.20.0070.00415.05
4.4.10.0100.00015.05
4.4.00.0060.00315.05
4.3.110.0070.00315.05
4.3.100.0090.00015.05
4.3.90.0070.00415.05
4.3.80.0100.00015.05
4.3.70.0050.00515.05
4.3.60.0040.00815.05
4.3.50.0070.00415.05
4.3.40.0070.00415.05
4.3.30.0030.00715.05
4.3.20.0030.00615.05
4.3.10.0070.00215.05
4.3.00.0040.00415.05

preferences:
193.87 ms | 403 KiB | 5 Q