PHP 4.0 Bug #9164: wrong variable is initialized

From: Date: Wed, 07 Feb 2001 21:21:44 +0000
Subject: PHP 4.0 Bug #9164: wrong variable is initialized
Groups: php.dev 
Request: Send a blank email to php-dev+get-45986@lists.php.net to get a copy of this message
From: di99otmi@hd.chalmers.se Operating system: slackware 7.1 PHP version: 4.0.3pl1 PHP Bug Type: Scripting Engine problem Bug description: wrong variable is initialized function Bjbase($antal){ $this->$lekar=$antal; $this->$dragna=array(); $this->$ess=58; echo $this->$dragna; } this is a constructor the echo statement prints 58 even though that it is $ess that is initialized to 58. The variable $dragna is not treated as an array anywhere but when the $ess line is gone it works fine. tried at another server too. is this a problem you know of? -- Edit Bug report at: http://bugs.php.net/?id=9164&edit=1

« previous php.dev (#45986) next »