<?php/** * @Author: cyany_blue * @Date: ??2018-11-24 10:30:15 * @Last Modified by: ??cyany_blue * @Last Modified time: 2018-11-24 10:53:36 */define("name", ‘just is a constant‘);echo name."<br>";echo constant(‘name‘).‘<br>‘;echo __LINE__.‘<br>‘; ?//The current line number echo __FILE__.‘<br>‘;//the current filenamefunction abc(){ ???echo __FUNCTION__.‘<br>‘;//echo function name}abc();class a{ ???function __construct(){ ???????echo __CLASS__.‘<br>‘; //current class name ???????echo ".‘<br>1354<br>‘;"; ???} ???public function abc(){ ???????echo ‘function name<br>‘; ???????echo __METHOD__.‘<br>‘;//current method name ???}}$abcd =new a();$abcd->abc();echo ‘---------------‘;
php-constant
原文地址:https://www.cnblogs.com/cyany/p/10011347.html