class - PHP difference when instantiating a new object? -
this question has answer here:
i have seen in many websites showing examples of instantiating objects.
$obj = new foo;
which straight forward, have seen this:
$obj = new foo();
is there difference? far noticed both same.
there no difference, matter of opinion. if foo
had constructor parameters need use new foo($param);
Comments
Post a Comment