On 17.06.2020 at 15:36, Christian Schneider wrote:
> I'm not sure I understand the second part "and doesn't have an explicit `:
> void` declaration".
> If there is a ' : void' declaration then returning any value will be an error.
> As far as I can see this is already the case:
> php -r 'class A { function __construct() : void { return 42; } }'
> with PHP 7.4 gives
> PHP Fatal error: A void function must not return a value in Command
> line code on line 1
But see <https://3v4l.org/uEOnQ>.
--
Christoph M. Becker
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php