Bug #76915 [Opn->Ver]: RefrectionFunction not return isDeprecated for "each"

From: Date: Fri, 21 Sep 2018 17:58:34 +0000
Subject: Bug #76915 [Opn->Ver]: RefrectionFunction not return isDeprecated for "each"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217187@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76915&edit=1 ID: 76915 Updated by: cmb@php.net Reported by: mitko at edabg dot com -Summary: RefrectionFunctio not return isDeprecated for "each" +Summary: RefrectionFunction not return isDeprecated for "each" -Status: Open +Status: Verified Type: Bug Package: Reflection related Operating System: Linux PHP Version: 7.2.10 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: The problem is that the function is not marked as ZEND_DEP_FE[1], since it is not desireable to raise a deprecation notice for each each() call. Nikita, is there a viable fix, or should we mark this as WONTFIX? [1] <https://github.com/php/php-src/blob/php-7.3.0RC1/Zend/zend_builtin_functions.c#L247> Previous Comments: ------------------------------------------------------------------------ [2018-09-21 14:17:14] mitko at edabg dot com Description: ------------ --- From manual page: http://www.php.net/function.each --- ReflectionFunction for "each" internal function doesn't return isDeprecated for php 7.2.10. Test script: --------------- <?php $refFunc = new ReflectionFunction('each'); if ($refFunc->isDeprecated()) echo "Deprecated\n"; else echo "NOT Deprecated\n"; Expected result: ---------------- Deprecated Actual result: -------------- NOT Deprecated ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76915&edit=1

« previous php.bugs (#217187) next »