One of the features included in the PHP 5.x releases is type hinting for validating that you have the right values for your functions and methods coming in.
In this new post to his blog Ilia Alshanetshy takes a look at the the feature and gives a patch to add it .