|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-01-13 16:19 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2014-01-13 16:19 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 15:00:01 2026 UTC |
Description: ------------ Hi! Currently when we extends on abstract class we cannot test if all conditions are met before instantiate the class. This is not usefull, can you improve ReflectionClass::isInstantiable or create new method for this feature? Test script: --------------- class classTest extends abstractTest { // Missing methodTest } abstract class abstractTest { abstract public function methodTest(); } Expected result: ---------------- class classTest extends abstractTest { // Missing methodTest } abstract class abstractTest { abstract public function methodTest(); } $reflectionClass = new ReflectionClass('calssTest'); if($reflectionClass->IsInstantiable()) { // OK } else { // Cutom error } Actual result: -------------- Fatal error: Class classTest contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (abstractTest::methodTest)