function foo() { $x = lol(); $y = $x[0]['id']; var_dump($x); var_dump($x[1] = 'hi'); return $y; }
function foo() { $x = lol(); $y = $x[0] = 2; var_dump($x); var_dump($y); $y = $x[][] = 2; var_dump($x); var_dump($y); }
public function getPhotoDay() { $ta_photo = lol(); return $tab_photo; }
$qip = gethostbyname('voci.dyndns.org'); $q = source_query($qip . ':27020'); if (!isset($q['players'])) { header("Content-type: image/png"); $im = imagecreatefrompng('newsrcds2off.png'); } else { $useimg = 'newsrcds2on.png'; header("Content-type: image/png"); $im = imagecreatefrompng($useimg); $white = imagecolorallocate($im, 255, 255, 255); imagestring($im, 2, 7, 1, $q['players'], $white); } imagepng($im); imagepng($im, $filename); imagedestroy($im); } // check to see if the local file exists if (file_exists($filename)) { // get difference in seconds between now and last modified date $diff = time() - filemtime($filename); // if greater than 5mins (300 seconds) get new file from source if ($diff >= 60) { lol(); } else { header("Content-type: image/png"); readfile($filename); } } else { // file doesn't exist, get data and create new file // lol(); }
function foo() { $x = lol(); unset($x[0]['id']); return $x; }