Re: Weird behaviour with references to objects...
| From: | Tim Molendijk | Date: | Fri, 08 Nov 2002 16:32:12 +0000 |
| Subject: | Re: Weird behaviour with references to objects... | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123413@lists.php.net to get a copy of this message | ||
"Ernest E Vogelsinger" <ernest@vogelsinger.at> wrote in message
news:5.1.1.6.2.20021108170633.00b8cb60@mail.vogelsinger.at...
>
> You might always simply omit the parameter when calling the function
> (you'll get a notice about that if enabled). You just cannot pass
constants:
>
> function Product(&$language)
> {
> ...
> }
>
> // ok, but gives a notice
> Product();
>
> // will fail
> Product('ger');
>
ok well that's an idea indeed... i'll think about it.
> If you keep your code like it is be warned that it may break with a future
> version of PHP.
>
why do you think it won't be supported by future versions? all i do is
passing an object by reference. because in this case this function always
should accept its argument as a reference and therefore is bad programming
habit does not mean the php construction is bad or weird!?!
>
> --
> >O Ernest E. Vogelsinger
> (\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>