<?php
class Simple
{
public static $X = 0;
public static function f()
{
self::$X = self::$X + 10;
return 1;
}
}
$simple = new Simple();
echo "X = " . $simple::$X += $simple::f();
?>
PD9waHAKY2xhc3MgU2ltcGxlCnsKCXB1YmxpYyBzdGF0aWMgJFggPSAwOwogCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGYoKQoJewoJCXNlbGY6OiRYID0gc2VsZjo6JFggKyAxMDsKCQlyZXR1cm4gMTsKCX0KfQogCiRzaW1wbGUgPSBuZXcgU2ltcGxlKCk7CmVjaG8gIlggPSAiIC4gJHNpbXBsZTo6JFggKz0gJHNpbXBsZTo6ZigpOwo/Pg==