3v4l.org

run code in 300+ PHP versions simultaneously
<?php function processURL($url) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 2 )); $result = curl_exec($ch); curl_close($ch); return $result; } // Tag als parameter auswerten $tag = 'IWH3F04ED0'; //$_GET["ID"]; $status = "0"; $db_server = 'rdbms.strato.de'; $db_benutzer = 'U1248927'; $db_passwort = 'oger1302'; $db_name = 'DB1248927'; $dz = mysql_connect($db_server, $db_benutzer, $db_passwort); mysql_select_db($db_name); $testguid = "Select * from `IWH` where `ID`='$tag'"; $result = mysql_query($testguid); if ($ds = mysql_fetch_object($result)) { $status = $ds ->Status; } $client_id = "4e950e12c0464c158995b32ac82792d1"; $url = 'https://api.instagram.com/v1/tags/'.$tag.'/media/recent?client_id='.$client_id; $all_result = processURL($url); $decoded_results = json_decode($all_result, true); if(empty($decoded_results['data'])) { // Status = '1' setzen ggf. aktivieren if ($status =="0") { // update status = 1 $aendern = "UPDATE `IWH` SET `Status` = '1' WHERE `ID`='$tag'"; $update = mysql_query($aendern); if ($update) { $status="1"; } } echo '<img src="https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/e15/11351734_443374872513879_1446730755_n.jpg" style="width:100%;" border="0" alt="Null" />'; } else { // count = Count +1 hochsetzen $aendern = "UPDATE `IWH` Set `Count` = `Count`+ 1 WHERE `ID`='$tag'"; $update = mysql_query($aendern); if ($update) { $status="1"; } header('location: https://instagram.com/explore/tags/'.$tag.'/'); } mysql_close($dz); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/uFjvT:28 Stack trace: #0 {main} thrown in /in/uFjvT on line 28
Process exited with code 255.

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:
49.04 ms | 401 KiB | 8 Q