Question about references
- From: "bingomanatee" <edelhart@xxxxxxxxxxxxxx>
- Date: 27 Jul 2005 15:49:06 -0700
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(&$ele1, $ele2, $ele3)
{
return array($ele1, $ele2, $ele3);
}
$my_other_array =& refer_that(refer_this(), 8, 9);
/******* END SAMPLES ***************/
is the referential integrity maintained in these cases?
.
- Prev by Date: Re: Client's IP address retrival
- Next by Date: Re: Try to write files using php5 on Linux
- Previous by thread: Client's IP address retrival
- Next by thread: Redirection if a condition is met
- Index(es):
Relevant Pages
|