|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-02 19:27 UTC] derick@php.net
[2003-06-08 13:54 UTC] zeev@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 22:00:01 2025 UTC |
Given: <?php class foo { private $message = 'this is a secret'; } class bar extends foo { } $obj = new bar; print_r($obj); ?> Yields: bar Object ( [] => this is a secret ) While the variable in question is "unnamed" and can't be referenced directly (i.e., via $obj->message), its value _is_ available, which certainly seems counter-intuitive to its declaration of privacy. This seems related to bug #23272, but I think it warrants its own ticket, as I believe it's more severe. (Especially considering the wasted memory allocation.)