3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode(file_get_contents('http://odnoklassniki.ru/dk?cmd=videoPlayerMetadata&mid=35615345204'), true); $return = array(); foreach($data['videos'] as $videos){ $filename = $videos['name']; $url = $videos['url']; $type = 'mp4'; $return[] = array( 'file' => $url, 'type' => $type, 'name' => $filename, ); } echo json_encode($return); ?>
Output for git.master, git.master_jit
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for odnoklassniki.ru failed: System error in /in/40unu on line 3 Warning: file_get_contents(http://odnoklassniki.ru/dk?cmd=videoPlayerMetadata&mid=35615345204): Failed to open stream: php_network_getaddresses: getaddrinfo for odnoklassniki.ru failed: System error in /in/40unu on line 3 Warning: Trying to access array offset on value of type null in /in/40unu on line 5 Warning: foreach() argument must be of type array|object, null given in /in/40unu on line 5 []
Output for rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for odnoklassniki.ru failed: System error in /in/40unu on line 3 Warning: file_get_contents(http://odnoklassniki.ru/dk?cmd=videoPlayerMetadata&mid=35615345204): Failed to open stream: php_network_getaddresses: getaddrinfo for odnoklassniki.ru failed: System error in /in/40unu on line 3 Warning: Trying to access array offset on null in /in/40unu on line 5 Warning: foreach() argument must be of type array|object, null given in /in/40unu on line 5 []

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:
43.26 ms | 402 KiB | 8 Q