3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Envato_Theme_Setup_Wizard { private static $_instance = null; private $theme_name = ''; private $envato_username = ''; public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); self::$_instance->init_globals(); //self::$_instance->init_actions(); } return self::$_instance; } public function init_globals() { $this->theme_name = 'HOBA'; $this->envato_username = 'THEMETEORY'; $this->oauth_script = 'http://themeteory.com/404.php'; } public function get_theme_name(){ return this->theme_name; } } var_dump(Envato_Theme_Setup_Wizard::get_theme_name); Envato_Theme_Setup_Wizard::instance(); var_dump(Envato_Theme_Setup_Wizard::get_theme_name);
based on nZr83
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ';' in /in/TAF6D on line 26
Process exited with code 255.
Output for 5.4.11 - 5.6.16
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/TAF6D on line 26
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/TAF6D on line 26
Process exited with code 255.