Although static classes are possible in PHP, they do not automatically execute the function Object() { [native code] } (if you attempt to call self:: construct(), an error will be returned).
As a result, you would need to develop an initialise() function and use it in each method:
<?php
class Hello
{
private static $greeting = 'Hello';
private static $initialized = false;
private static function initialize()
{
if (self::$initialized)
return;
self::$greeting .= ' There!';
self::$initialized = true;
}
public static function greet()
{
self::initialize();
echo self::$greeting;
}
}
Hello::greet(); // Hello There!
?>
I hope this helps you.