3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stream = 'monstercat'; $url = sprintf('https://api.twitch.tv/api/channels/%s/access_token/', $stream); $page = file_get_contents($url); $json = json_decode($page, true); $token = $json['token']; $sig = $json['sig']; echo 'http://usher.twitch.tv/api/channel/hls/' . $stream . '.m3u8?player=twitchweb&token=' . rawurlencode($token) . '&sig=' . $sig;
Output for git.master, git.master_jit
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/fV1XQ on line 5 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.twitch.tv/api/channels/monstercat/access_token/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/fV1XQ on line 5 Warning: file_get_contents(https://api.twitch.tv/api/channels/monstercat/access_token/): Failed to open stream: Operation not permitted in /in/fV1XQ on line 5 Warning: Trying to access array offset on value of type null in /in/fV1XQ on line 7 Warning: Trying to access array offset on value of type null in /in/fV1XQ on line 8 Deprecated: rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated in /in/fV1XQ on line 9 http://usher.twitch.tv/api/channel/hls/monstercat.m3u8?player=twitchweb&token=&sig=
Output for rfc.property-hooks
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/fV1XQ on line 5 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.twitch.tv/api/channels/monstercat/access_token/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/fV1XQ on line 5 Warning: file_get_contents(https://api.twitch.tv/api/channels/monstercat/access_token/): Failed to open stream: Operation not permitted in /in/fV1XQ on line 5 Warning: Trying to access array offset on null in /in/fV1XQ on line 7 Warning: Trying to access array offset on null in /in/fV1XQ on line 8 Deprecated: rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated in /in/fV1XQ on line 9 http://usher.twitch.tv/api/channel/hls/monstercat.m3u8?player=twitchweb&token=&sig=

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
55.48 ms | 402 KiB | 8 Q