3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limite = 100; $tag = 'lembrardesercrianca'; // Client id $client_id = "60d01f1357c24a5aab29133e8f91de2a"; // Api $api = "https://api.instagram.com/v1/tags/$tag/media/recent?client_id=$client_id&count=$limite"; //populares //$api = "https://api.instagram.com/v1/tags/$tag/media/popular?client_id=$client_id&count=$limite"; // Contents $contents = file_get_contents($api); // Json $json = json_decode($contents, true); // Find in the next 5 pages (limited for 20 results by page) for ($i = 0; $i < 5; $i++) { if($json['pagination']['next_url']){ $nextLink = $json['pagination']['next_url']; $contents = file_get_contents($nextLink); $json2 = json_decode($contents, true); // Add the data $combinedData = array_merge($json['data'], $json2['data']); } } return $combinedData; ?>
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/blpat on line 12 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.instagram.com/v1/tags/lembrardesercrianca/media/recent?client_id=60d01f1357c24a5aab29133e8f91de2a&count=100) is not within the allowed path(s): (/tmp:/in:/etc) in /in/blpat on line 12 Warning: file_get_contents(https://api.instagram.com/v1/tags/lembrardesercrianca/media/recent?client_id=60d01f1357c24a5aab29133e8f91de2a&count=100): Failed to open stream: Operation not permitted in /in/blpat on line 12 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Trying to access array offset on value of type null in /in/blpat on line 18 Warning: Undefined variable $combinedData in /in/blpat on line 27
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/blpat on line 12 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.instagram.com/v1/tags/lembrardesercrianca/media/recent?client_id=60d01f1357c24a5aab29133e8f91de2a&count=100) is not within the allowed path(s): (/tmp:/in:/etc) in /in/blpat on line 12 Warning: file_get_contents(https://api.instagram.com/v1/tags/lembrardesercrianca/media/recent?client_id=60d01f1357c24a5aab29133e8f91de2a&count=100): Failed to open stream: Operation not permitted in /in/blpat on line 12 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Trying to access array offset on null in /in/blpat on line 18 Warning: Undefined variable $combinedData in /in/blpat on line 27

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:
76.47 ms | 404 KiB | 8 Q