Edit report at https://bugs.php.net/bug.php?id=71211&edit=1
ID: 71211
Updated by: [email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.