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

From: Date: Wed, 07 Feb 2018 16:02:16 +0000
Subject: Bug #75186 [Com]: Inconsistent reflection of Closure:::__invoke()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213848@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: carusogabriel34 at gmail dot com 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: Could not reproduced https://3v4l.org/mGJjd Previous Comments: ------------------------------------------------------------------------ [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 (#213848) next »