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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 + 49 = ?
Subscribe to this entry?

 
 [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

Pull Requests

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: Thu Oct 31 23:01:28 2024 UTC