note 128652 added to language.types.never

From: Date: Fri, 30 Jun 2023 09:40:43 +0000
Subject: note 128652 added to language.types.never
Groups: php.notes 
Request: Send a blank email to php-notes+get-220612@lists.php.net to get a copy of this message
The never type should be allowed to be part of a union for return types: <?php function execv(string $path, array $argv): int|never { // implementation of execv either replaces the process, // or returns 1. FFI::cdef('int execv(const char *path, char *const argv[]);', 'libc.so.6'); /* snip */ return $result; } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.168 (proxied: 89.162.26.126) ---- Manual Page -- https://php.net/manual/en/language.types.never.php Edit -- https://main.php.net/note/edit/128652 Del: integrated -- https://main.php.net/note/delete/128652/integrated Del: useless -- https://main.php.net/note/delete/128652/useless Del: bad code -- https://main.php.net/note/delete/128652/bad+code Del: spam -- https://main.php.net/note/delete/128652/spam Del: non-english -- https://main.php.net/note/delete/128652/non-english Del: in docs -- https://main.php.net/note/delete/128652/in+docs Del: other reasons-- https://main.php.net/note/delete/128652 Reject -- https://main.php.net/note/reject/128652 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220612) next »