I'm just getting into OOP with php and discovered almost by accident that if I put the object type before the name in the function definition that the IDE I'm using can resolve member functions and data members for the object.
For example:
public function foo(car $car)
{
}
As opposed to:
public function foo($car)
{
}
Is the first method legitimate and preferred?
Thanks for helping a noob :-)