News for hackers. Stuff that matters.
Re:Announcing a specification for PHP by TazeTSchnitzel on Wednesday July 30, 2014 @03:23PM (#8110365)
Scalar (int, float, string) type hinting may be added in a future PHP version, and there's currently an RFC for return types (I expect it'll pass myself). PHP already let you type hint for classses.
Re:Announcing a specification for PHP by spaux on Wednesday July 30, 2014 @04:17PM (#8110662)
You can also hint on interfaces. If strict typing is important, I use the SPL primitive wrapper classes like SplString or SplInt http://php.net/manual/en/class.spltype.php
Re:Announcing a specification for PHP by birkbork on Wednesday July 30, 2014 @03:31PM (#8110409)
Cool! I wasn't aware of the RFC. Must be this one then? https://wiki.php.net/rfc/returntypehinting
Re:Announcing a specification for PHP by TazeTSchnitzel on Wednesday July 30, 2014 @03:35PM (#8110432)
Yep.