- error_reporting: documentation ( source)
<?php
// Only the static methods shall be called using the static call syntax
class Config {
protected static $config = array();
public function get($name) {
return static::$config[$name];
}
public function set($name, $value) {
static::$config[$name] = $value;
}
}
error_reporting(-1);
Config::set("xxx", "yyy"); // Error - Config::set is not marked as static
print(Config::get("xxx")."\n"); // Error - Config::get is not marked as static