Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7088 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86983 invoked by uid 1010); 14 Jan 2004 09:33:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86959 invoked from network); 14 Jan 2004 09:33:22 -0000 Received: from unknown (HELO rwcrmhc13.comcast.net) (204.127.198.39) by pb1.pair.com with SMTP; 14 Jan 2004 09:33:22 -0000 Received: from coogle.localdomain (pcp02905316pcs.roylok01.mi.comcast.net[68.62.1.1]) by comcast.net (rwcrmhc13) with SMTP id <2004011409332101500b6vmse>; Wed, 14 Jan 2004 09:33:21 +0000 To: PHP Internals Content-Type: text/plain Message-ID: <1074072793.19144.50.camel@coogle.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 14 Jan 2004 04:33:13 -0500 Content-Transfer-Encoding: 7bit Subject: Weird. From: john@coggeshall.org (John Coggeshall) I know that this issue to some extent or another has been brought up before, but I just wanted to make sure that this is really how things are supposed to work... Apparently the statements setting B C and D are all equivalent. This could be absolutely bogus, but I thought maybe someone could explain briefly why if it is :) John myvar = "A"; $this->$myvar = "B"; $this->${'myvar'} = "C"; $this->${'$myvar'} = "D"; echo 'this->myvar: '.$this->myvar."\n"; echo 'this->$myvar: '.$this->$myvar."\n"; echo 'this->${\'myvar\'}: '.$this->${'myvar'}."\n"; echo 'this->${\'$myvar\'}: '.$this->${'$myvar'}."\n"; echo 'this->$$$$$$$myvar: '.$this->$$$$$$$myvar."\n"; echo 'this->$$$$$$${\'$$$myvar\'}: ' . $this->$$$$$$${'$$$myvar'}."\n"; } } ?> -- -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- John Coggeshall http://www.coggeshall.org/ The PHP Developer's Handbook http://www.php-handbook.com/ -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-