Saturday, February 6, 2010

Type Hint in PHP

Type Hint in PHP.
Day by day PHP introduces new strong OOPS concepts earlier i used the Type Hinting (earlier it's available in Hot cup of Java) in type hint we restrict the input type parameter like this:

class DAO{function add(Model $model){}}
here we restrict the input parameter is object type & also object of Model class.
but yet it's have some limitation, available for object and array not for integer, float etc