--- A.php ----
require_once 'B.php';
class A
{
public function __constructor($x){...}
public function foo()
{
$b = B::getInstance();
...
}
}
--- B.php ----
require_once 'A.php';
class B extends A
{
protected static $_instance = null;
protected function __construct(){}
public static function getInstance()
{....}
}
PHP just stops interpreting the code as soon as it reaches line
protected function __construct(){}
and outputs everything before and nothing that would have been sent to the browser afterwards.
And as soon as I just take that line out, by changing it to
// protected function __construct(){}
everything works fine!?
I don't get that.
Any ideas?