Bug #76915 [Ver]: RefrectionFunction not return isDeprecated for "each"
| From: | nikic@php.net | Date: | Fri, 21 Sep 2018 19:31:18 +0000 |
| Subject: | Bug #76915 [Ver]: RefrectionFunction not return isDeprecated for "each" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217188@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: nikic@php.net
Reported by: mitko at edabg dot com
Summary: RefrectionFunction not return isDeprecated for
"each"
Status: Verified
Type: Bug
Package: Reflection related
Operating System: Linux
PHP Version: 7.2.10
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
We could add a check in reflection that checks if the function is "each" specifically. But
I don't think introducing such a hack is worthwhile.
Previous Comments:
------------------------------------------------------------------------
[2018-09-21 17:58:34] cmb@php.net
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>
------------------------------------------------------------------------
[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