RE: [PHP4BETA] A quick clarification question about PHP4...
| From: | Samuel Liddicott | Date: | Tue, 24 Aug 1999 08:13:53 +0000 |
| Subject: | RE: [PHP4BETA] A quick clarification question about PHP4... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3676@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Andi Gutmans [mailto:andi@zend.com]
> Sent: 24 August 1999 07:21 AM
> To: Jim Brain; Zend
> Subject: Re: [PHP4BETA] A quick clarification question about PHP4...
>
> >If all those can be passed, can someone give me an example of something
> >that cannot be passed?
>
> function foo ($ar)
> {
> static $foo = $ar;
> }
>
> This wouldn't work anymore.
Why?
Would this work?
function foo (&$ar)
{
static $foo = $ar;
}
or this
function foo (&$ar)
{
static $foo = &$ar;
}
Has it got anything to do with those devious object-copies that take place?
[I really wish the current definition of "object" would be replaced with
"pointer_to_object" so that passing objects by reference is the same as
passing by value.
Sam