Bug #71211 [Opn->Nab]: ReflectionClass->isAbstract() returns false for traits
| From: | laruence@php.net | Date: | Fri, 25 Dec 2015 04:01:01 +0000 |
| Subject: | Bug #71211 [Opn->Nab]: ReflectionClass->isAbstract() returns false for traits | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198214@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71211&edit=1
ID: 71211
Updated by: laruence@php.net
Reported by: lisachenko dot it at gmail dot com
Summary: ReflectionClass->isAbstract() returns false for
traits
-Status: Open
+Status: Not a bug
Type: Bug
Package: Reflection related
PHP Version: 7.0.1
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
traits are not abstarct. the new behavior is better.
Previous Comments:
------------------------------------------------------------------------
[2015-12-24 11:32:43] lisachenko dot it at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=71211&edit=1