From: Operating system: Linux/Ubuntu Lucid Lynx PHP version: Irrelevant Package: Class/Object related Bug Type: Bug Bug description:Static private attributes visibility
Description: ------------ Static private attributes of a class can be directly by another non-friendly resource or file. Test script: --------------- If I define a class with static methods, as the following: class Device{ static private $id = 15; } For example, if the class Device is stored into device.class.php and I have another file called main.php and the implementation of main.php is the following: <?php include("device.class.php"); echo "The device's id is: ".Device::$id; ?> Expected result: ---------------- The device's id is 15. Actual result: -------------- Not relevant results yet. -- Edit bug report at http://bugs.php.net/bug.php?id=52968&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52968&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52968&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52968&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52968&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52968&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52968&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52968&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52968&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52968&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52968&r=support Expected behavior: http://bugs.php.net/fix.php?id=52968&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52968&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52968&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52968&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52968&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52968&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52968&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52968&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52968&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52968&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52968&r=mysqlcfg