I have seen in many websites showing examples of instantiating objects.
$obj = new foo;
which is straight forward, but I have also seen this:
$obj = new foo();
is there a difference? So far I noticed both do the same.
There is no difference, it is a matter of opinion. If foo
had a constructor with parameters you would need to use new foo($param);