Skip to content

Instantly share code, notes, and snippets.

@Tyrael
Created August 28, 2014 07:55
Show Gist options
  • Save Tyrael/7d9020efaf6a01080ed1 to your computer and use it in GitHub Desktop.
Save Tyrael/7d9020efaf6a01080ed1 to your computer and use it in GitHub Desktop.
09:52:03 @Tyrael | [21:40:09] the ReflectionClass::newInstanceWithoutConstructor change should be also mentioned │ jpauli
09:52:03 @Tyrael | [21:40:43] which reminds me that even the current doc is wrong about which classes are not allowed to be instantiated: http://hu1.php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php │ jwoodcock
09:52:03 @Tyrael | [21:40:56] "A ReflectionException if the class is an internal class that cannot be instantiated without invoking the constructor." │ krakjoe
09:52:03 @Tyrael | [21:42:20] ReflectionClass has an isInternal method, which tells you whether or not the class was defined by userland or by core/ext │ lapistano
09:52:03 @Tyrael | [21:43:10] but newInstanceWithoutConstructor was not just checking if a class is not an userland class, but checking if the class uses custom object storage │ m6w6
09:52:03 @Tyrael | [21:44:23] not every internal class has a custom object storage, and even a userland class can have a custom object storage (when extending an internal class using custom object storage) │ MANCHUCK
09:52:03 @Tyrael | [21:45:27] since 5.6, we only remove the creation of classes which use custom object storage and declared as a final class │ mazzanet
09:52:03 @Tyrael | [21:45:53] s/remove/prohibit/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment