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

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -