Bug #78895 [NEW]: Reflection detects abstract non-static class as abstract static

From: Date: Mon, 02 Dec 2019 08:13:01 +0000
Subject: Bug #78895 [NEW]: Reflection detects abstract non-static class as abstract static
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223998@lists.php.net to get a copy of this message
From: abashurov at plesk dot com Operating system: All PHP version: 7.4.0 Package: Reflection related Bug Type: Bug Bug description:Reflection detects abstract non-static class as abstract static Description: ------------ Initially reproduced on Arch Linux and Windows Server 2016: php -v PHP 7.4.0 (cli) (built: Nov 30 2019 10:43:49) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies with Xdebug v2.8.0, Copyright (c) 2002-2019, by Derick Rethans php.exe -v PHP 7.4.0 (cli) (built: Nov 27 2019 10:13:59) ( NTS Visual C++ 2017 x64 ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies As 3v4l shows, this behavior is exclusive to PHP 7.4: https://3v4l.org/rEqh2 Test script: --------------- <?php abstract class Foo { abstract public function Bar(); } $ref = new ReflectionClass(Foo::class); var_dump(Reflection::getModifierNames($ref->getModifiers())); Expected result: ---------------- Calling getModifiers on a non-static class does not detect it as static Actual result: -------------- Calling getModifiers on a non-static class detects it as static -- Edit bug report at https://bugs.php.net/bug.php?id=78895&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78895&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78895&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78895&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78895&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78895&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78895&r=support Expected behavior: https://bugs.php.net/fix.php?id=78895&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78895&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78895&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78895&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78895&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78895&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78895&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78895&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78895&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78895&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78895&r=mysqlcfg

« previous php.bugs (#223998) next »