|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesnone (last revision 2013-03-11 14:19 UTC by me at felixcarmona dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-03-11 14:45 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2013-03-11 14:45 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Feb 15 02:00:01 2026 UTC |
Description: ------------ When i have a public property and private/protected method with the same name, i can't access to the property, because the method is called. I'm using ->name; and NOT ->name(); Test script: --------------- <?php class Test { public $test = 5; protected function test() { return 6; } } $test = new Test(); echo $test->test; Expected result: ---------------- 5 Actual result: -------------- Fatal error: Call to protected Test::test() from invalid context