php - Instantiating the self class inside a method? -


is there problem if instantiating current class inside method ? using code:

class say_hi (){      function __construct(){         echo "hi";     }      public function again( $data ){         new say_hi();     }  } 

yes can , work correctly.


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

java - Unable to make sub reports with Jasper -

Integrity error when loading fixtures for Selenium testing in Django -