note 128259 added to language.types.never
| From: | ali1289445 at gmail dot com | Date: | Mon, 27 Feb 2023 17:06:10 +0000 |
| Subject: | note 128259 added to language.types.never | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220217@lists.php.net to get a copy of this message | ||
<?php
function sayHello(string $name): never
{
echo "Hello, $name";
exit(); // if we comment this line, php throws fatal error
}
sayHello("John"); // result: "Hello, John"
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 95.214.210.93)
----
Manual Page -- https://php.net/manual/en/language.types.never.php
Edit -- https://main.php.net/note/edit/128259
Del: integrated -- https://main.php.net/note/delete/128259/integrated
Del: useless -- https://main.php.net/note/delete/128259/useless
Del: bad code -- https://main.php.net/note/delete/128259/bad+code
Del: spam -- https://main.php.net/note/delete/128259/spam
Del: non-english -- https://main.php.net/note/delete/128259/non-english
Del: in docs -- https://main.php.net/note/delete/128259/in+docs
Del: other reasons-- https://main.php.net/note/delete/128259
Reject -- https://main.php.net/note/reject/128259
Search -- https://main.php.net/manage/user-notes.php