From: bobwei9 at hotmail dot com Operating system: Irrelevant PHP version: 5.5Git-2013-01-19 (Git) Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:Extend the ::class-feature
Description: ------------ I just have seen this commit: http://git.php.net/?p=php-src.git;a=commitdiff;h=8991ed016fa257c9f8ba42580c34568b3c2ce3e5 Could you also add $instance->class ? Which operates on an already instanced Object. Would be for example useful to be able to handle internal and userland classes differently. Test script: --------------- function isInternalObject ($object) { if (!is_object($object)) return false; return !file_exists("classes/$object.php"); } // In the case where you name the files with the name of their class... include 'classes/Foo.php'; $foo = new Foo(); $std = new stdClass; var_dump(isInternalObject($foo)); var_dump(isInternalObject($std)); Expected result: ---------------- bool(false) bool(true) Actual result: -------------- Notice: Undefined property: %s::$class in php shell code on line 1 -- Edit bug report at https://bugs.php.net/bug.php?id=64030&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64030&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64030&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64030&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64030&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64030&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64030&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64030&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64030&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64030&r=support Expected behavior: https://bugs.php.net/fix.php?id=64030&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64030&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64030&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64030&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64030&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64030&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64030&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64030&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64030&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64030&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64030&r=mysqlcfg