- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL - E_STRICT);
class A {
private $message;
public function __construct($msg)
{
$this->message = $msg;
}
public function test()
{
$self = 'this';
if (isset($this) === false) {
$$self = new self('bar');
}
$$self->show();
}
public function show() {
echo 'show: ', $this->message, "\n";
}
}
$o = new A('foo');
$o->test();
A::test();