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

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -