Simple enough question. Lets check out some test code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php class TEST { public function __construct($arguments) { print "constructed with: {$arguments}"; } public function __call($name, $arguments) { print "called {$name} with: {$arguments}"; } } new TEST('hi'); |
Ran the first time, the output was:
constructed with: hi
Ran without a constructor?
BLANK. __call is not called.
Now we can all sleep at night! whew!
Tags: PHP















