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 -

delphi - How to resolve undeclared identifier problems -

Alternative for object pools in cocos2d-x v3.3 -