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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

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 22:01:27 2024 UTC