The introduction of common magic constants can be directly referenced in the PHP manual: Connect
Attach a Demo:
/** * Created by PhpStorm. * User: yanfeng * Date: 2016/3/31 * Time: 13:28 */functionoutput(){echo"function:
"; echo__CLASS__ . "
"; echo__METHOD__ . "
"; echo__FUNCTION__ . "
";}classtest{staticfunctionoutput() {echo"class:
"; echo__CLASS__ . "
"; echo__METHOD__ . "
"; echo__FUNCTION__ . "
"; output(); }}test::output();
Output Result:
class:testtest::outputoutputfunction:outputoutput
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above is introduced in PHP to get the current class name, method name, Function name Magic constants (the first time with markdown), including the markdown aspects of the content, I hope that the PHP tutorial interested in a friend helpful.