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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -