Bug #81297 [Com]: Incorrect __toString() return for internal deprecated functions
| From: | a at b dot c dot de | Date: | Mon, 26 Jul 2021 23:09:18 +0000 |
| Subject: | Bug #81297 [Com]: Incorrect __toString() return for internal deprecated functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235386@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81297&edit=1
ID: 81297
Comment by: a at b dot c dot de
Reported by: herobrine135111 at gmail dot com
Summary: Incorrect __toString() return for internal
deprecated functions
Status: Open
Type: Bug
Package: Reflection related
PHP Version: 8.0.8
Block user comment: N
Private report: N
New Comment:
"internal" and "deprecated" are flags describing the status of the function, and
"libxml" is name of the containing extension.
This isn't new with 8.0; 7.4 described is_real() the same way: "<internal,
deprecated:standard>".
So while the punctuation might be better (an additional space after the colon, say), the words are
in the right order.
Previous Comments:
------------------------------------------------------------------------
[2021-07-26 07:49:16] herobrine135111 at gmail dot com
Description:
------------
ReflectionFunction and ReflectionMethod __toString() method for internal deprecated functions
returns strange looking <internal, deprecated:libxml> instead of <internal:libxml,
deprecated>
Test script:
---------------
<?php
// libxml_disable_entity_loader is deprecated in PHP 8
echo (new ReflectionFunction('libxml_disable_entity_loader'));
Expected result:
----------------
Function [ <internal:libxml, deprecated> function libxml_disable_entity_loader ] {
- Parameters [1] {
Parameter #0 [ <optional> bool $disable = true ]
}
- Return [ bool ]
}
Actual result:
--------------
Function [ <internal, deprecated:libxml> function libxml_disable_entity_loader ] {
- Parameters [1] {
Parameter #0 [ <optional> bool $disable = true ]
}
- Return [ bool ]
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81297&edit=1