Bug #75186 [Com]: Inconsistent reflection of Closure:::__invoke()

From: Date: Wed, 07 Feb 2018 20:24:04 +0000
Subject: Bug #75186 [Com]: Inconsistent reflection of Closure:::__invoke()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213851@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75186&edit=1 ID: 75186 Comment by: kontakt at kukulich dot cz Reported by: kontakt at kukulich dot cz Summary: Inconsistent reflection of Closure:::__invoke() Status: Open Type: Bug Package: Reflection related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: See the test in the description. Previous Comments: ------------------------------------------------------------------------ [2018-02-07 16:02:15] carusogabriel34 at gmail dot com Could not reproduced https://3v4l.org/mGJjd ------------------------------------------------------------------------ [2017-09-11 12:37:00] kontakt at kukulich dot cz Description: ------------ https://3v4l.org/QBIvb Test script: --------------- <?php $rc = new ReflectionClass(Closure::class); $methodNames = array_map(function ($m) { return $m->getName(); }, $rc->getMethods()); var_dump(in_array('__invoke', $methodNames)); var_dump($rc->hasMethod('__invoke')); Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(false) bool(true) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75186&edit=1

« previous php.bugs (#213851) next »