php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1855 Wrong behavior in overloading a variable
Submitted: 1999-07-23 19:08 UTC Modified: 1999-07-31 20:35 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 1 OS: Debian GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: christophe dot massiot at mail dot dotcom dot fr
New email:
PHP Version: OS:

 

 [1999-07-23 19:08 UTC] christophe dot massiot at mail dot dotcom dot fr
The following program will return 0 whereas it should return 1 :

if (TRUE) {
  class titi {
    var $KEYS = array();
  }
  class toto extends titi {
    var $KEYS = array("login");
  }
}
$toto = new toto;
echo count($toto->KEYS);

Note that the problem disappears if you remove the if (TRUE) statement.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-31 20:35 UTC] zeev at cvs dot php dot net
Fixed in the latest CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 09:01:35 2024 UTC