PHP and dynamic magic constants -


i working on class in im trying pull way set __function__ magic constant in php dynamically.

code far

<?php      class testfunction {         var $method = __function__;          public function __construct() {          }          public function testmethod() {             return $this->method;         }     } 

its not working.. im not sure if possible... trying think outside box.

the __function__ constant return name of executing function when use inside function. __method__ same method of class have use inside class method. in example if replaced __function__ __method__ wouldn't work. if you're after name of class try __class__


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -