|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-04-21 04:06 UTC] requinix@php.net
-Status: Open
+Status: Feedback
-Package: PHP Language Specification
+Package: Scripting Engine problem
[2018-04-21 04:06 UTC] requinix@php.net
[2018-04-21 04:13 UTC] miklcct at gmail dot com
-Status: Feedback
+Status: Closed
[2018-04-21 04:13 UTC] miklcct at gmail dot com
[2018-04-21 04:13 UTC] miklcct at gmail dot com
[2018-04-21 04:14 UTC] requinix@php.net
-Status: Closed
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 09:00:01 2025 UTC |
Description: ------------ An included file inside a class method cannot access class private member, but can access protected member Test script: --------------- // View.php class View { private $data = 'test'; public function render() { require 'view.phtml' } } (new View)->render(); // view.phtml <html><head><title>$this->data</title></head><body></body></html> Expected result: ---------------- An HTML with title test is returned Actual result: -------------- A fatal error saying cannot access private property