Re: when $a = &new class is necessary
| From: | till | Date: | Mon, 24 Sep 2007 19:29:56 +0000 |
| Subject: | Re: when $a = &new class is necessary | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48168@lists.php.net to get a copy of this message | ||
On 9/24/07, Christian Schmidt <pear.php.net@chsc.dk> wrote:
> (...)
> To reduce this risk and help package owners who want to make their PHP4
> packages "PHP5-friendly", it may be worth introducing a utility function
> that handles the delicate art of handling PHP4 references. For example
> replace "$foo =& new Bar($bla)" with "$foo =&
> PEAR::makeNew('Bar', $bla)".
(Totally off-topic, but....)
Object factories?! IMO one of the easiest ways to make code more complicated. :)
Till