fork(1) download
  1. <?php
  2. class Simple
  3. {
  4. public static $X = 0;
  5.  
  6. public static function f()
  7. {
  8. self::$X = self::$X + 10;
  9. return 1;
  10. }
  11. }
  12.  
  13. $simple = new Simple();
  14. echo "X = " . $simple::$X += $simple::f();
  15. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
X = 11