<?php
$ustdeger = array();

function get_img( $img ) {
global $ustdeger;
//islemler
return $result;
}

// fonksiyon ile yaptığımız işlemler
$img = '123.jpg';
$islem = get_img($img);
// işlem sonucunu daha sonra kullanmak için session veya cookie olarak atıyoruz.
$_SESSION['get_img'] = $islem;

function next_func() {
global $_SESSION['get_img'];
$result = 0;
if ( !empty($_SESSION['get_img']) ) {
//islemler
}
return $result;
}
?>