3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m3u = '#EXTM3U #EXTINF:-1 tvg-name="Canal 26" tvg-logo="https://demo.com/xDjOUuz.png" group-title="Argentina", https://demolivevideo1.com/playlist.m3u8 #EXTINF:-1 tvg-name="LN" tvg-logo="https://demo2.com/vJYzGt1.png" group-title="Argentina", https://demolivevideo2.com/playlist.m3u8 #EXTINF:-1 tvg-name="ABC" tvg-logo="https://demo3.com/5CVl5EF.png" group-title="Australia", https://demolivevideo3.com/playlist.m3u8""" '; $newFile = '<?xml version="1.0" encoding="utf-8"?> <data></data> '; $doc = new DOMDocument(); $doc->loadXML($newFile); $xpath = new DOMXpath($doc); $destination = $xpath->query('/data'); $step1 = explode('#EXTINF:-1 ',str_replace('#EXTM3U','',$m3u)); $step2 = array_slice($step1,1); foreach ($step2 as $item) { $step3 = str_replace('" ','" xxx',explode(',', $item))[0]; $step4 = explode('xxx',$step3); $link = explode(',',$item)[1]; $params = []; foreach ($step4 as $step) { $param = explode('=',$step)[1]; array_push($params,$param); } $chan = " <channels> <name>{$params[0]}</name> <banner>{$params[1]}</banner> <url>{$link}</url> <country>{$params[2]}</country> </channels>"; $template = $doc->createDocumentFragment(); $template->appendXML($chan); $destination[0]->appendChild($template); }; echo $doc->saveXml();

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.10.0110.00718.84
8.5.00.0140.01020.43
8.4.150.0030.00014.05
8.4.140.0150.00718.04
8.4.130.0130.00718.18
8.4.120.0130.00722.73
8.4.110.0140.00722.87
8.4.100.0130.00818.22
8.4.90.0100.01019.05
8.4.80.0110.01018.21
8.4.70.0140.00718.45
8.4.60.0110.01119.22
8.4.50.0120.00419.89
8.4.40.0140.00719.92
8.4.30.0160.00620.86
8.4.20.0060.00318.25
8.4.10.0060.00321.04
8.3.280.0150.00518.89
8.3.270.0140.00616.91
8.3.260.0090.01016.85
8.3.250.0110.00819.31
8.3.240.0120.00717.07
8.3.230.0060.00316.96
8.3.220.0140.00417.87
8.3.210.0120.00717.25
8.3.200.0050.00516.99
8.3.190.0120.00717.59
8.3.180.0090.00916.85
8.3.170.0090.00919.28
8.3.160.0180.00018.87
8.3.150.0030.00521.05
8.3.140.0030.00618.73
8.3.130.0060.00316.92
8.3.120.0030.00621.11
8.3.110.0040.00417.00
8.3.100.0060.00318.74
8.3.90.0050.00326.77
8.3.80.0060.00318.68
8.3.70.0180.00717.74
8.3.60.0380.00923.47
8.3.50.0160.00824.08
8.3.40.0250.01024.03
8.3.30.0310.00723.88
8.3.20.0310.00624.54
8.3.10.0330.00724.60
8.3.00.0310.01024.82
8.2.290.0120.00621.00
8.2.280.0090.00918.75
8.2.270.0110.00817.41
8.2.260.0080.00019.27
8.2.250.0100.00017.03
8.2.240.0100.00617.03
8.2.230.0000.00820.94
8.2.220.0030.00524.06
8.2.210.0080.00026.77
8.2.200.0060.00317.00
8.2.190.0170.00518.38
8.2.180.0300.00824.79
8.2.170.0340.00823.82
8.2.160.0330.00824.36
8.2.150.0320.01124.77
8.2.140.0320.00924.60
8.2.130.0280.00824.82
8.2.120.0340.00523.94
8.2.110.0310.00723.89
8.2.100.0310.00623.67
8.2.90.0290.01024.08
8.2.80.0290.00923.83
8.2.70.0290.00923.67
8.2.60.0300.00723.70
8.2.50.0290.00823.66
8.2.40.0290.00824.00
8.2.30.0240.00722.43
8.2.20.0220.00622.69
8.2.10.0270.00322.42
8.2.00.0230.00922.59
8.1.330.0090.01022.43
8.1.320.0110.00816.59
8.1.310.0110.00717.08
8.1.300.0070.01018.74
8.1.290.0060.00330.84
8.1.280.0280.01024.79
8.1.270.0310.00924.51
8.1.260.0310.00724.85
8.1.250.0320.00825.09
8.1.240.0290.00723.92
8.1.230.0320.00924.15
8.1.220.0290.01023.68
8.1.210.0370.00623.76
8.1.200.0280.00923.61
8.1.190.0280.00923.61
8.1.180.0270.00623.67
8.1.170.0240.00723.82
8.1.160.0180.01022.66
8.1.150.0230.00722.44
8.1.140.0250.00822.30
8.1.130.0250.00722.46
8.1.120.0240.00521.86
8.1.110.0210.00521.49
8.1.100.0220.00621.48
8.1.90.0220.00621.53
8.1.80.0200.00921.51
8.1.70.0220.00621.49
8.1.60.0230.00721.59
8.1.50.0230.00921.53
8.1.40.0240.00721.22
8.1.30.0240.00621.24
8.1.20.0230.00721.29
8.1.10.0220.00521.21
8.1.00.0230.00821.20
8.0.300.0260.00823.76
8.0.290.0270.00823.53
8.0.280.0210.00822.40
8.0.270.0200.00822.23
8.0.260.0230.00522.41
8.0.250.0220.00721.74
8.0.240.0220.00621.34
8.0.230.0190.00821.33
8.0.220.0200.00621.35
8.0.210.0230.00621.33
8.0.200.0210.00621.39
8.0.190.0200.00821.33
8.0.180.0210.00821.36
8.0.170.0230.00620.97
8.0.160.0220.00520.98
8.0.150.0190.00820.97
8.0.140.0230.00521.04
8.0.130.0210.00720.95
8.0.120.0220.00721.01
8.0.110.0180.00920.94
8.0.100.0200.00620.97
8.0.90.0210.00720.98
8.0.80.0210.00720.97
8.0.70.0220.00620.99
8.0.60.0210.00620.94
8.0.50.0250.00521.02
8.0.30.0210.00720.95
8.0.20.0210.00621.00
8.0.10.0220.00521.00
7.4.330.0160.00822.04
7.4.320.0200.00721.30
7.4.300.0180.00821.22
7.4.290.0200.00621.26
7.4.280.0230.00420.87
7.4.270.0200.00620.87
7.4.260.0210.00520.87
7.4.250.0200.00720.88
7.4.240.0200.00720.87
7.4.230.0210.00420.85
7.4.220.0200.00520.86
7.4.210.0220.00520.86
7.4.200.0210.00620.87
7.4.190.0210.00520.88
7.4.180.0200.00620.89
7.4.160.0190.00720.87
7.4.150.0210.00520.86
7.4.140.0180.00620.80
7.4.130.0200.00520.82
7.4.120.0180.00720.84
7.4.110.0180.00620.80
7.4.100.0200.00520.85
7.4.90.0170.00720.84
7.4.80.0200.00520.82
7.4.70.0200.00620.83
7.4.60.0170.00820.87
7.4.50.0190.00520.80
7.4.40.0180.00620.80
7.4.30.0200.00520.82
7.4.20.0180.00620.86
7.4.10.0180.00620.84
7.4.00.0160.00720.81

preferences:
43.27 ms | 403 KiB | 5 Q