Bug #17778: Strange boolean property behavior
| From: | jason at mercuryboard dot com | Date: | Sun, 16 Jun 2002 01:08:09 +0000 |
| Subject: | Bug #17778: Strange boolean property behavior | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-10535@lists.php.net to get a copy of this message | ||
From: jason@mercuryboard.com
Operating system: Windows XP
PHP version: 4.0CVS-2002-06-15
PHP Bug Type: Class/Object related
Bug description: Strange boolean property behavior
Windows XP, PHP 4.3.0-dev as a module on Apache 1.3.24
In PHP 4.2.0, this script prints, as expected, "Constructor called - The
variable is false"
In 4.3.0-dev-zend2-alpha1pl1, this script prints "Constructor called - The
variable is true"
----------------------------------
class test{
var $a;
function test(){
$this->a = false;
echo 'Constructor called - ';
}
}
$obj = new test;
echo 'The variable is ' . ($obj->a ? 'true' : 'false');
--
Edit bug report at http://bugs.php.net/?id=17778&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17778&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17778&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17778&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17778&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17778&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17778&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17778&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17778&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17778&r=globals