I have a question about refrences.
I know if you have a function that returns an array and you designate
it and its recipient by "at" signs the reference is included.
/*** SAMPLE 1 *********/
function &refer_this( ){ return array(1, 2, 3); };
$my_var =& $refer_this();
/***** END SAMPLE 1 **********/
What about situations where there isn't an equal sign to ampersand? for
instance if you include the array in an array directly? or as a
parameter in another function?
/********* SAMPLE 2 ***********/
$my_array = array(4, refer_this(), 6);
/********** SAMPLE 3 ************/
function &refer_that(&$e le1, $ele2, $ele3)
{
return array($ele1, $ele2, $ele3);
}
$my_other_array =& refer_that(refe r_this(), 8, 9);
/******* END SAMPLES ***************/
is the referential integrity maintained in these cases?
I know if you have a function that returns an array and you designate
it and its recipient by "at" signs the reference is included.
/*** SAMPLE 1 *********/
function &refer_this( ){ return array(1, 2, 3); };
$my_var =& $refer_this();
/***** END SAMPLE 1 **********/
What about situations where there isn't an equal sign to ampersand? for
instance if you include the array in an array directly? or as a
parameter in another function?
/********* SAMPLE 2 ***********/
$my_array = array(4, refer_this(), 6);
/********** SAMPLE 3 ************/
function &refer_that(&$e le1, $ele2, $ele3)
{
return array($ele1, $ele2, $ele3);
}
$my_other_array =& refer_that(refe r_this(), 8, 9);
/******* END SAMPLES ***************/
is the referential integrity maintained in these cases?