Re: Designing for PHP4 with PHP5 in mind...

From: Date: Tue, 07 Jan 2003 09:05:22 +0000
Subject: Re: Designing for PHP4 with PHP5 in mind...
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-93207@lists.php.net to get a copy of this message
To be more precise - passed by handle. Andrey ----- Original Message ----- From: "Leon Atkinson" <leon@leonatkinson.com> To: "John Wells" <jb@sourceillustrated.com> Cc: <php-dev@lists.php.net> Sent: Tuesday, January 07, 2003 6:31 AM Subject: Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind... > > Any good links you could throw my way describing proposed changes? > > There are archives of the Zend Engine 2 list at zend.com: > http://www.zend.com/lists.php > > There is one big change with objects that will break BC. Objects pass by > reference instead of value, both for function calls and assignments. For > example: > > <? > class a {} > > function c($c) > { > $c->name = 'C'; > } > > $a = new a; > $b = $a; > > $a->name = "A"; > print($a->name); > $b->name = "B"; > print($a->name); > c($a); > print($a->name); > ?> > > In ZE1 you get "AAA". In ZE2 you get "ABC". > > Leon > > --- > Leon Atkinson <http://www.leonatkinson.com/> > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.dev (#93207) next »