Re: [RFC] Void Return Type (v0.2, reöpeni ng)

From: Date: Thu, 15 Oct 2015 16:20:49 +0000
Subject: Re: [RFC] Void Return Type (v0.2, reöpeni ng)
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-88822@lists.php.net to get a copy of this message
On 15 October 2015 at 16:32, Andrea Faulds <ajf@ajf.me> wrote: > In a sense, what this RFC offers might be called a compromise. It enforces > the rules of void within the function, but at the end of the > day the > caller still gets a null out of it since that's what PHP's always done. > > > If this truly is the case, then all you get over hinting void as the return type instead of null is a fatal error for return null; Sure you can argue for capturing intent but realistically the difference in intent between 'returns no value' and 'does not return a value' is something for philosophers to argue over not programmers. ;)

« previous php.internals (#88822) next »