fork download
  1. <?php
  2.  
  3. class Test() {
  4. private static $instance = null;
  5.  
  6. static public function getInstance() {
  7. if(is_null(self::$instance)) {
  8. self::$instance = new self();
  9. }
  10. return self::$instance;
  11. }
  12. }
Runtime error #stdin #stdout #stderr 0.01s 20592KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected '(', expecting '{' in /home/v1XYjN/prog.php on line 3