fork(1) download
  1. <?php
  2.  
  3. class Helper
  4. {
  5. protected static $_instance;
  6. public static function _instance() {
  7. if(is_null(self::$_instance)) self::$_instance = new self();
  8. return self::$_instance;
  9. }
  10. public $title = 'title';
  11. public function meta() {
  12. $this->title = 'new title';
  13. return self::$_instance;
  14. }
  15. }
  16.  
  17. var_export(Helper::_instance()->meta());
Success #stdin #stdout 0.02s 23572KB
stdin
Standard input is empty
stdout
Helper::__set_state(array(
   'title' => 'new title',
))