note 128106 added to language.types.callable

From: Date: Thu, 12 Jan 2023 10:35:13 +0000
Subject: note 128106 added to language.types.callable
Groups: php.notes 
Request: Send a blank email to php-notes+get-220060@lists.php.net to get a copy of this message
Note that the callable type declaration cannot be used with intersection types introduced in PHP 8.1: interface foo {} function bar (callable&foo $param) {} will report: Fatal error: Type callable cannot be part of an intersection type See https://wiki.php.net/rfc/pure-intersection-types#supported_types ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.158.213 (proxied: 213.155.83.52) ---- Manual Page -- https://php.net/manual/en/language.types.callable.php Edit -- https://main.php.net/note/edit/128106 Del: integrated -- https://main.php.net/note/delete/128106/integrated Del: useless -- https://main.php.net/note/delete/128106/useless Del: bad code -- https://main.php.net/note/delete/128106/bad+code Del: spam -- https://main.php.net/note/delete/128106/spam Del: non-english -- https://main.php.net/note/delete/128106/non-english Del: in docs -- https://main.php.net/note/delete/128106/in+docs Del: other reasons-- https://main.php.net/note/delete/128106 Reject -- https://main.php.net/note/reject/128106 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220060) next »