|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-12-27 23:49 UTC] tony2001@php.net
[2005-12-28 11:12 UTC] mattias dot segerdahl at bitcom dot se
[2005-12-28 11:39 UTC] tony2001@php.net
[2005-12-28 11:47 UTC] mattias dot segerdahl at bitcom dot se
[2006-01-03 18:39 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ print_r($Class) displays private/protected.. Reproduce code: --------------- <?php class foo { private $bar = array(); protected $foobar = array(); public function __construct() { $this->bar['blah'] = 'asfdsdf'; $this->foobar['blah'] = '0as87d'; } } try { $f = new foo(); print_r($f); } catch (exception $e) { die($e->getMessage()); } ?> Expected result: ---------------- foo Object ( [bar:private] => Array ( [blah] => ) [foobar:protected] => Array ( [blah] => ) ) Actual result: -------------- foo Object ( [bar:private] => Array ( [blah] => asfdsdf ) [foobar:protected] => Array ( [blah] => 0as87d ) )