On 11 March 2021 19:39:26 GMT, Dan Ackroyd <dan...@basereality.com> wrote: >Unfortunately people in the community have started doing what I >feared, and using void as 'no value is returned', which is not what >the language actually _does_. > >I realise the above might be slightly discombobulating if, for >example, some people had written large static code analyzers that had >misinterpreted void like this.
I think it is you that is misinterpreting things. The "void" keyword explicitly signals the intent "this function does not return a value". People find that a useful thing to signal, even if the language still allows the function to be used in expression context. They also find it useful to be reminded "Hey, you know this function you're using as an expression? That makes no sense, because it doesn't return anything." You may not find that useful, but those that do are using "void" exactly as intended. Regards, Oh, and on this point: -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php