|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-10 07:34 UTC] zeev@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 20 21:00:01 2026 UTC |
Description: ------------ If I create a class with private or protected properties in it the contents of those can be seen from the outside via the functions var_dump and print_r. This may lead to some security vulnerabilities with future applications. This may not be actually a bug, but it seems rather illogical to be able to access the values with this method while others fail. Reproduce code: --------------- class Test { private $foo; function __construct () { $this->foo = 'xy'; } } $test = new Test; print_r($test); Expected result: ---------------- test Object ( ) Actual result: -------------- test Object ( [foo:private] => xy )