Re: [RFC] Void Return Type

From: Date: Sat, 14 Feb 2015 08:42:46 +0000
Subject: Re: [RFC] Void Return Type
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Sat, Feb 14, 2015 at 01:03:44PM +0800, Xinchen Hui wrote:

>    function a() : void {};
> 
> following codes  still works:
> 
>    $b = a();
> 
> so, if you want a void return type, and if you want it to be a useful feature..
> 
> above expr should be invalid with an error " a() return nothing"

+1 - my first thought.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>


Thread (24 messages)

« previous php.internals (#82675) next »