#30451 [NoF->Opn]: static properties don't work properly
| From: | guth at fiifo dot u-psud dot fr | Date: | Sat, 07 May 2005 01:13:33 +0000 |
| Subject: | #30451 [NoF->Opn]: static properties don't work properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78740@lists.php.net to get a copy of this message | ||
ID: 30451
User updated by: guth at fiifo dot u-psud dot fr
Reported By: guth at fiifo dot u-psud dot fr
-Status: No Feedback
+Status: Open
Bug Type: Zend Engine 2 problem
Operating System: Linux
PHP Version: 5.0.2
Assigned To: andi
New Comment:
No change with the last CVS.
Previous Comments:
------------------------------------------------------------------------
[2005-04-02 01:00:23] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-03-25 01:33:58] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-10-16 01:50:54] guth at fiifo dot u-psud dot fr
Description:
------------
hello,
Yet another strange behaviour in PHP...
My english is always too bad to explain the problem, so have a look to
the following code...
Reproduce code:
---------------
<?php
class A {
protected static $property = TRUE;
protected static function method() {
return TRUE;
}
}
class B extends A {
public function __construct() {
var_dump(self::method());
var_dump(parent::method());
var_dump(self::$property);
var_dump(parent::$property);
}
}
new B;
?>
Expected result:
----------------
bool(true)
bool(true)
bool(true)
bool(true)
Actual result:
--------------
bool(true)
bool(true)
bool(true)
Fatal error: Cannot access protected property A::$property in
/www/test2.php on line 21
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30451&edit=1