Hacker News new | past | comments | ask | show | jobs | submit login

PHP is based on C. It's way more consistent with C, Java, C# , etc to do the former. So the real question is why

    function foobar() : int { .. }
instead of

    function int foobar() { .. }



1. function foobar() makes it easier to grep for. 2. if I recall correctly, it made some parts of the grammar easier.


Yeah, you could go either way on it really. It seems weird to mix them, though!




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: