3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Config { private static $config = array(); private function Get($name) { return static::$config[$name]; } public function Set($name, $value) { static::$config[$name] = $value; var_dump($this); } } $c = new Config(); var_dump($c->set(1, 2)); Config::Set('xxx', 'yyy'); print(Config::Get('xxx')."\n");

preferences:
38.86 ms | 402 KiB | 5 Q