<?php class Demo { public static $cache; static function test($id, $val) { return self::$cache[$id] = $val; } } echo Demo::test(1, 1); echo Demo::test(2, 2); var_dump(Demo::$cache);
You have javascript disabled. You will not be able to edit any code.