Re: Bug #1222: $this point does not contain function list

From: Date: Thu, 11 Mar 1999 23:54:12 +0000
Subject: Re: Bug #1222: $this point does not contain function list
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-4584@lists.php.net to get a copy of this message
There's no difference between $this and the object, they're identical. Are you reset()ing between your loops? Zeev On 11 Mar 1999 jonsmirl@mediaone.net wrote: > From: jonsmirl@mediaone.net > Operating system: Win95 > PHP version: 3.0.7 > PHP Bug Type: Other > Bug description: $this point does not contain function list > > A pointer to an object is not behaving the same as the $this pointer inside of the same object. > > $obj = new oObject; > $obj->checkme($obj); > > class oObject { > function checkme($obj) { > > // this list will include the member function and properties > while ( list( $key, $val ) = each( $obj ) ) { > printf("AA %s => %s (%s)", $key, $val, gettype($val)); > } > > // this list only shows the properties > while ( list( $key, $val ) = each( $this ) ) { > printf("BB %s => %s (%s)", $key, $val, gettype($val)); > } > } > } > > I would have expected the $this pointer to provide me with the list of functions too. > > I need this function list to construct a remote proxy to the object. > > Jon Smirl > jonsmirl@mediaone.net > > > > -- > PHP Development Mailing List http://www.php.net/ > To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net > For help: php-dev-help@lists.php.net > > -- ----------------------------------------------------- Zeev Suraski <zeev@zend.com> For a PGP public key, finger bourbon@netvision.net.il -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4584) next »