3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Title of this code //php 5.5.12 $start = time(); $expire = time() + 2592000; $proto = 'http://'; $domain = 't2-btsport-live-hls-prod.akamaized.net'; $path = 'out/u/europe/europe.m3u8'; $key = 'A65A28D4A2F97F470624F15E637C205D'; $params = 'ip=2.31.243.204~st='.$start.'~exp='.$expire.'~acl=/*'; //WITH IP //$params = 'st='.$start.'~exp='.$expire.'~acl=/*'; //NO IP function h2b($str) { $bin = ""; $i = 0; do { $bin .= chr(hexdec($str{$i}.$str{($i + 1)})); $i += 2; } while ($i < strlen($str)); return $bin; } $hash = hash_hmac('SHA256', $params, pack("H*", "A65A28D4A2F97F470624F15E637C205D")); echo $proto.$domain.'/'.$path.'?hdnea='.$params.'~hmac='.$hash; ?>
Output for 7.4.0
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/mhogt on line 18 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/mhogt on line 18 http://t2-btsport-live-hls-prod.akamaized.net/out/u/europe/europe.m3u8?hdnea=ip=2.31.243.204~st=1464160637~exp=1466752637~acl=/*~hmac=09db77ef7bab41bacd05e2aebf29ab133acf508ab5d9bbae048ea0edae9c909a
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.9, 7.2.11 - 7.2.25, 7.3.0 - 7.3.12
http://t2-btsport-live-hls-prod.akamaized.net/out/u/europe/europe.m3u8?hdnea=ip=2.31.243.204~st=1464160637~exp=1466752637~acl=/*~hmac=09db77ef7bab41bacd05e2aebf29ab133acf508ab5d9bbae048ea0edae9c909a
Output for 7.2.10
http://t2-btsport-live-hls-prod.akamaized.net/out/u/europe/europe.m3u8?hdnea=ip=2.31.243.204~st=1464160638~exp=1466752638~acl=/*~hmac=5df7543466abb4a295caf7808a2f20143a4575238ca01f451e8a95c89241e9ac

preferences:
67.5 ms | 409 KiB | 5 Q