|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-08-17 11:59 UTC] info at dynasource dot eu
Description: ------------ when creating a new ReflectionClass object with a class that doesnt exist, this class is not showing in the reflection class exception. This does happen in 5.6.* versions of PHP. Test script: --------------- $reflection = new ReflectionClass($class); Expected result: ---------------- an exception with "$class does not exist" Actual result: -------------- an exception with "Class does not exist" (not the variable $class) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 20:00:02 2025 UTC |
I don't think a feature request was being made. There was a bug fixed that stopped __CLASS__ from working in a Closure declared inside a class, that's since been fixed. __CLASS__ has never worked inside a closure, it has no sensible value; Closures are final, it's only possible semi-truthful value is "Closure", that's not useful. To give it the value of anything else including __FUNCTION__ would not only be false, but would result in {closure}. So it doesn't make sense as a bug, or a feature request. The issue is resolved anyway, so closing the bug :)