#30135 [Opn->Bgs]: private/protected variables are not protected
| From: | tony2001@php.net | Date: | Sat, 18 Sep 2004 05:13:05 +0000 |
| Subject: | #30135 [Opn->Bgs]: private/protected variables are not protected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66370@lists.php.net to get a copy of this message | ||
ID: 30135
Updated by: tony2001@php.net
Reported By: sh4dow at php dot pl
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Win2000
PHP Version: 5.0.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This was done intentionally to reduce time for debugging.
Previous Comments:
------------------------------------------------------------------------
[2004-09-17 19:44:31] sh4dow at php dot pl
Description:
------------
The private and protected variables ar not protected. print_f or
var_dump display them without any errors.
Var_dump and print_f should have access from inside, but no outside.
Reproduce code:
---------------
<?php
class Foo {
private $password='pass1';
}
$foo = new Foo();
print_r($foo);
?>
Expected result:
----------------
null
Actual result:
--------------
Foo Object ( [password:private] => pass1 )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30135&edit=1