Bug #17778 Updated: Strange boolean property behavior
| From: | sander@php.net | Date: | Sun, 16 Jun 2002 13:03:42 +0000 |
| Subject: | Bug #17778 Updated: Strange boolean property behavior | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10734@lists.php.net to get a copy of this message | ||
ID: 17778
Updated by: sander@php.net
Reported By: jason@mercuryboard.com
Status: Open
-Bug Type: Class/Object related
+Bug Type: Zend Engine 2 problem
Operating System: Windows XP
PHP Version: 4.0CVS-2002-06-15
New Comment:
Moved to a brand new category!
Previous Comments:
------------------------------------------------------------------------
[2002-06-15 21:08:09] jason@mercuryboard.com
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 this bug report at http://bugs.php.net/?id=17778&edit=1