|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-25 01:33 UTC] sniper@php.net
[2005-05-07 03:13 UTC] guth at fiifo dot u-psud dot fr
[2005-05-09 11:32 UTC] sniper@php.net
[2005-05-18 17:32 UTC] stas@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 23:00:01 2025 UTC |
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