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
 [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 Apr 29 17:01:29 2024 UTC