3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php header('Content-Type: application/json'); $rows = 10; $tp_chan=2; $tp_profi=913; $tp_sec_start=1877; $ts_sec_start=2106; $server = 'http://200.76.77.237:80/LIVE/H01/CANAL'.$tp_chan.'/PROFILE03-'.$tp_profi.'/'; $count = 0; $nextsecPlus = 4; $ignoreFive=false; $ignoreFive2=false; $today = date('Ymd'); echo "#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:5 #EXT-X-MEDIA-SEQUENCE:".$tp_profi."0".$tp_sec_start."\n"; for($i = 0; $i < $rows; $i++) { if($nextsecPlus==4){ if($ignoreFive==true && $ignoreFive2==false){$nextsecPlus = $nextsecPlus;} $ts_sec_start = $ts_sec_start+$nextsecPlus; $ts = /*$nextsecPlus.'A_'.*/$server.$tp_sec_start.'-'.$today.'T'.$ts_sec_start.'.ts'; if($nextsecPlus==5) { $nextsecPlus=4; $ignoreFive2=true; } } else if($nextsecPlus == 5 && $ignoreFive==false){ $ts_sec_start = $ts_sec_start+5; $ts = /*$nextsecPlus.'B_'.*/$server.$tp_sec_start.'-'.$today.'T'.$ts_sec_start.'.ts'; $nextsecPlus=3; } else if($nextsecPlus == 3){ $ts_sec_start = $ts_sec_start+$nextsecPlus; $ts = /*$nextsecPlus.'C_'.*/$server.$tp_sec_start.'-'.$today.'T'.$ts_sec_start.'.ts'; $nextsecPlus=4; $ignoreFive = true; } $count++; if($count >= 5 && $ignoreFive==false && $nextsecPlus ==4){ $nextsecPlus = 5; } $tp_sec_start++; echo "#EXTINF:4.004,\n".$ts."\n"; } ?>
based on mBmcE
Output for 5.6.28, 7.0.20 - 7.2.8
#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:5 #EXT-X-MEDIA-SEQUENCE:91301877 #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1877-20160701T2110.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1878-20160701T2114.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1879-20160701T2118.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1880-20160701T2122.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1881-20160701T2126.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1882-20160701T2131.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1883-20160701T2134.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1884-20160701T2138.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1885-20160701T2142.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1886-20160701T2146.ts
Output for 5.5.0 - 5.6.23, 7.0.0 - 7.0.8
#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:5 #EXT-X-MEDIA-SEQUENCE:91301877 #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1877-20160302T2110.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1878-20160302T2114.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1879-20160302T2118.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1880-20160302T2122.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1881-20160302T2126.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1882-20160302T2131.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1883-20160302T2134.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1884-20160302T2138.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1885-20160302T2142.ts #EXTINF:4.004, http://200.76.77.237:80/LIVE/H01/CANAL2/PROFILE03-913/1886-20160302T2146.ts