|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-21 17:09 UTC] cataphract@php.net
-Status: Open
+Status: Bogus
[2010-09-21 17:09 UTC] cataphract@php.net
[2010-09-21 17:43 UTC] e dot visciola at xaos dot it
[2010-09-21 21:58 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
Description: ------------ When I call a protected instance method of an object inside a class method of "the same type" I'd like to have an error. The example explain: Test script: --------------- class A { protected function instanceMethod() { echo 'Instance method called, but it is not right because instance method is protected<br />'; } public static function staticMethod() { echo 'Static method called<br />'; $a = new A(); $a->instanceMethod(); } } A::staticMethod(); Expected result: ---------------- That was generated an error to access the protected method Actual result: -------------- Static method called Instance method called, but it is not right because instance method is protected