php forcing type

I have a collegue who constantly assigns variable and forces their type. For example he would declare something like so:\[code\]$this->id = (int)$this->getId();\[/code\]or when returning he will always return values as such:\[code\]return (int)$id;\[/code\]I understand that php is a loosely typed language and so i am not asking what the casting is doing. I am really wondering what the benefits are of doing this - if any - or if he is just wasting time and effort in doing this?
 
Back
Top