note 128994 added to function.get-debug-type
| From: | vyacheslav dot belchuk at gmail dot com | Date: | Thu, 02 Nov 2023 17:52:17 +0000 |
| Subject: | note 128994 added to function.get-debug-type | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220950@lists.php.net to get a copy of this message | ||
Also, the function returns the correct type of Closure, as opposed to gettype()
<?php
echo get_debug_type(function () {}) . PHP_EOL;
echo get_debug_type(fn () => '') . PHP_EOL . PHP_EOL;
echo gettype(function () {}) . PHP_EOL;
echo gettype(fn () => '');
?>
Output:
Closure
Closure
object
object
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 65.108.82.209)
----
Manual Page -- https://php.net/manual/en/function.get-debug-type.php
Edit -- https://main.php.net/note/edit/128994
Del: integrated -- https://main.php.net/note/delete/128994/integrated
Del: useless -- https://main.php.net/note/delete/128994/useless
Del: bad code -- https://main.php.net/note/delete/128994/bad+code
Del: spam -- https://main.php.net/note/delete/128994/spam
Del: non-english -- https://main.php.net/note/delete/128994/non-english
Del: in docs -- https://main.php.net/note/delete/128994/in+docs
Del: other reasons-- https://main.php.net/note/delete/128994
Reject -- https://main.php.net/note/reject/128994
Search -- https://main.php.net/manage/user-notes.php