#40348 [NEW]: Reading of private/protected properties should be allowed for Reflection API
| From: | thc at forestfactory dot de | Date: | Sun, 04 Feb 2007 06:54:30 +0000 |
| Subject: | #40348 [NEW]: Reading of private/protected properties should be allowed for Reflection API | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-108384@lists.php.net to get a copy of this message | ||
From: thc at forestfactory dot de
Operating system: any
PHP version: 5.2.0
PHP Bug Type: Class/Object related
Bug description: Reading of private/protected properties should be allowed for Reflection API
Description:
------------
"Fixing" "bug" #37816 in PHP 5.2.0 made Reflection more or less useless
for the one purpose I used it for: reverse-engineering and debugging.
While I can understand that there might be a reason for disallowing
"setValue" on private/protected properties, why shouldn't I be allowed to
read the value of a property?
I wrote a nice debugger/reflection class for 5.1.x which stopped working
now. And what will I do? I will use print_r() or var_export() and parse
the output using regular expressions or something to get the value. So
what is the point of this? I still get the value. You just made my code
less readable and more performance consuming
IMHO this was never a bug! And as #24852 mentions it isn't a bug that
print_r() gives access to values of non-public properties
Regards Thomas
--
Edit bug report at http://bugs.php.net/?id=40348&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40348&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40348&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40348&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40348&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40348&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40348&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40348&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40348&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40348&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40348&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40348&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40348&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40348&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40348&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40348&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40348&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40348&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40348&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40348&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40348&r=mysqlcfg