Re: Newbie Q: the & in new

From: Date: Thu, 21 Mar 2002 15:38:01 +0000
Subject: Re: Newbie Q: the & in new
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1615@lists.php.net to get a copy of this message
It effectively means , assign a reference from the newly created object to $window. If you ommit it, you are getting a copy of that object. And, due PHP4's nature, it's not the same object you had in the constructor when you don't use &new. It's asboluteyly required for PHP-GTK if you don't want to run into all kind of troubles. On Thu, Mar 21, 2002 at 10:06:48AM -0500, Karl Pietri wrote : > in the gtk documentation stuff is created like so > $window=&new GtkWindow; > > what does the & do and is it neccessary? (or if you can just point me to a > php/php-gtk doc page that would be fine); > > Thanks > > -Karl > > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

« previous php.gtk.general (#1615) next »