Bug #71211 [NEW]: ReflectionClass->isAbstract() returns false for traits
| From: | lisachenko dot it at gmail dot com | Date: | Thu, 24 Dec 2015 11:32:45 +0000 |
| Subject: | Bug #71211 [NEW]: ReflectionClass->isAbstract() returns false for traits | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-198196@lists.php.net to get a copy of this message | ||
From: lisachenko dot it at gmail dot com
Operating system:
PHP version: 7.0.1
Package: Reflection related
Bug Type: Bug
Bug description:ReflectionClass->isAbstract() returns false for traits
Description:
------------
Looks like some constant values was changed in PHP7.0, after that
ReflectionClass->isAbstract() for traits starts to return "false",
whereas in earlier versions of PHP result was "true".
Test script:
---------------
<?php
// https://3v4l.org/5RF6l
trait Foo {}
$ref = new ReflectionClass('Foo');
var_dump($ref->isAbstract());
Expected result:
----------------
bool(true)
Actual result:
--------------
bool(false)
--
Edit bug report at https://bugs.php.net/bug.php?id=71211&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71211&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71211&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71211&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71211&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71211&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71211&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71211&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71211&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71211&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71211&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71211&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71211&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71211&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71211&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71211&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71211&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71211&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71211&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71211&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71211&r=mysqlcfg