View Single Post
Old 04-17-2009, 10:23 PM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by PHP_Manual
Type Hints can only be of the object and array (since PHP 5.1) type. Traditional type hinting with int and string isn't supported.
Plus, you wouldn't want to be type hinting when calling a method anyway. Only in the function/method declaration. Using it the way that you did, the argument would need to have belonged to a class/interface called 'int'.
Salathe is offline  
Reply With Quote