- error_reporting: documentation ( source)
<?php
namespace One {
trait foo {
static $bar = [];
public static function a() {
}
}
}
namespace Two {
use One\foo as OneFoo;
trait bat {
use OneFoo;
public static function a() {
$bar[] = 'qux';
}
}
}
namespace Three {
class qux {
use \Two\bat;
public static function a() {
\Two\bat::a();
}
}
class bing extends qux { }
}
namespace {
error_reporting(32767);
\Three\bing::a();
}