3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Применение Google Image Api * автор: Nc_SOft * 25.11.09 */ /* Не знаю как вас, а меня изрядно подзаебали умники, продающие "воздух" под громким названием глобальный поиск картинок */ $search = 'Сиськи Семенович'; $json = file_get_contents('http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=large&q='.urlencode($search).'&start=0'); $data = json_decode($json); //смотрим с чем имеем дело //print_r($data); //и на вывод ?><div>результатов: <?=$data->responseData->cursor->estimatedResultCount;?></div> <?php foreach ($data->responseData->results as $v) : ?> <div><a href="<?=$v->unescapedUrl;?>"><img src="<?=$v->tbUrl;?>" /></a></div> <?php endforeach;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for ajax.googleapis.com failed: System error in /in/SLgn2 on line 14 Warning: file_get_contents(http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=large&q=%D0%A1%D0%B8%D1%81%D1%8C%D0%BA%D0%B8+%D0%A1%D0%B5%D0%BC%D0%B5%D0%BD%D0%BE%D0%B2%D0%B8%D1%87&start=0): Failed to open stream: php_network_getaddresses: getaddrinfo for ajax.googleapis.com failed: System error in /in/SLgn2 on line 14 <div>результатов: Warning: Attempt to read property "responseData" on null in /in/SLgn2 on line 21 Warning: Attempt to read property "cursor" on null in /in/SLgn2 on line 21 Warning: Attempt to read property "estimatedResultCount" on null in /in/SLgn2 on line 21 </div> Warning: Attempt to read property "responseData" on null in /in/SLgn2 on line 22 Warning: Attempt to read property "results" on null in /in/SLgn2 on line 22 Warning: foreach() argument must be of type array|object, null given in /in/SLgn2 on line 22

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:
38.03 ms | 403 KiB | 8 Q