#23522 [NEW]: Negative valus in variable declaration in classes

From: Date: Wed, 07 May 2003 05:44:39 +0000
Subject: #23522 [NEW]: Negative valus in variable declaration in classes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39199@lists.php.net to get a copy of this message
From: wima at tiscali dot ch Operating system: Windows XP Professional PHP version: 4.3.2RC2 PHP Bug Type: Unknown/Other Function Bug description: Negative valus in variable declaration in classes Hello This script does output 0 instead of -1. If I initialize the variable a in the constructor (the commented line) the output is correct. I'm not shure if it is a bug, but if I initialize the variable with a positive value it works correct. Thanks for fixing this bug. Marco <? $a = new myClass; class myClass { var $a = -1; function myClass() { //$this->a = -1; echo $this->a; } } ?> -- Edit bug report at http://bugs.php.net/?id=23522&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23522&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23522&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23522&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23522&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23522&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23522&r=support Expected behavior: http://bugs.php.net/fix.php?id=23522&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23522&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23522&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23522&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23522&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23522&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23522&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23522&r=gnused

« previous php.bugs (#39199) next »