New syntax proposal (type hinting)

From: Date: Sat, 23 Mar 2019 18:45:46 +0000
Subject: New syntax proposal (type hinting)
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-27904@lists.php.net to get a copy of this message
I wish have opportunity to set types not only like: function a(): string {} or function b(): ?string {} but also as: function c(): string | int {} or function d(): ?string | ?array {}// all of them should mark that null is accepted. Similar thing is I suppose is in catch{} clause. Of course not only return types can affected but also types in args. And sometime we can think about types of properties and variables however this is rather long distance future. So the first part of this message is could be done in the near future?

« previous php.webmaster (#27904) next »