php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17778 Strange boolean property behavior
Submitted: 2002-06-15 21:08 UTC Modified: 2002-09-19 10:51 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: jason at mercuryboard dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0CVS-2002-06-15 OS: Windows XP
Private report: No CVE-ID: None
 [2002-06-15 21:08 UTC] jason at mercuryboard dot 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');

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 09:03 UTC] sander@php.net
Moved to a brand new category!
 [2002-06-29 03:52 UTC] andi@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

This seems to be fixed in the CVS. Please grab it or wait for alpha2.
Thanks for the report.

 [2002-09-05 16:23 UTC] phpsurf at ifrance dot com
still not working with alpha 2 !
 [2002-09-19 10:51 UTC] zeev@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 02:01:33 2024 UTC