当前位置:网站首页>PHP Basics - PHP magic constants
PHP Basics - PHP magic constants
2022-07-24 09:24:00 【Chon.Wang】
PHP contain 9 A magic constant . Their values change as their position in the code changes .
| name | explain |
|---|---|
__LINE__ | The current line number in the file . |
__FILE__ | The full path and filename of the file . If used in the included file , Then return the included file name . |
__DIR__ | Directory of files . If used in included files , Returns the directory where the included files are located . It is equivalent to dirname(__FILE__). Unless it's the root directory , Otherwise, the name in the directory does not include the trailing slash . |
__NAMESPACE__ | The name of the current namespace . |
__TRAIT__ | Trait Name .Trait The name includes the scope it is declared ( for example Foo\Bar). |
__CLASS__ | The name of the current class . The class name includes its declared scope ( for example Foo\Bar). When used in trait In the method ,CLASS Is to call trait The name of the class of the method . |
__FUNCTION__ | The name of the current function . Anonymous functions are {closure}. |
__METHOD__ | Class . |
ClassName::class | Full class name . |
边栏推荐
- Getting started with sorting - insert sorting and Hill sorting
- 链表——19. 删除链表的倒数第 N 个结点
- Makefile variables and dynamic library static library
- With 8 years of product experience, I have summarized these practical experience of continuous and efficient research and development
- Introduction to common ansible modules
- Android系统安全 — 5.2-APK V1签名介绍
- Nuggets manufacturing industry, digital commerce cloud supply chain collaborative management system to achieve full chain intelligent management and control
- 详解LinkedList
- C#/VB. Net: convert word or EXCEL documents to text
- From single architecture to distributed architecture, there are many pits and bugs!
猜你喜欢
![[don't bother to strengthen learning] video notes (II) 1. What is Q-learning?](/img/4f/809adc96e30fad03a113acc3df4b61.png)
[don't bother to strengthen learning] video notes (II) 1. What is Q-learning?
![[assembly language practice] solve the unary quadratic equation ax2+bx+c=0 (including source code and process screenshots, parameters can be modified)](/img/5e/782e5c33accc455994aae044970431.png)
[assembly language practice] solve the unary quadratic equation ax2+bx+c=0 (including source code and process screenshots, parameters can be modified)

Little dolphin "transformed" into a new intelligent scheduling engine, which can be explained in simple terms in the practical development and application of DDS

Aruba learning notes 06 wireless control AC basic configuration (CLI)

Cloud primordial (12) | introduction to kubernetes foundation of kubernetes chapter

JS locate Daquan to get the brother, parent and child elements of the node, including robot instances

Understanding of magnetic parameters in Hall sensors

Little dolphin "transformed" into a new intelligent scheduling engine, which can be explained in simple terms in the practical development and application of DDS

Android system security - 5.2-apk V1 signature introduction

Detailed LinkedList
随机推荐
Firewalld firewall related commands
Six pictures show you why TCP shakes three times?
华为无线设备安全策略配置命令
[example of URDF exercise based on ROS] use of four wheeled robot and camera
Open source summer interview | learn with problems, Apache dolphin scheduler, Wang Fuzheng
How should tiktok shop cooperate with live broadcast in the background?
NVIDIA set persistent mode
云原生(十二) | Kubernetes篇之Kubernetes基础入门
Re6: reading paper licin: a heterogeneous graph based approach for automatic legal stat identification fro
MySQL基础篇(一)-- SQL基础
How do tiktok merchants bind the accounts of talents?
How to open the port number of the server, and the corresponding port of common network services
【汇编语言实战】一元二次方程ax2+bx+c=0求解(含源码与过程截屏,可修改参数)
The next stop of data visualization platform | gifts from domestic open source data visualization datart "super iron powder"
Account 1-2
A null pointer exception is reported when the wrapper class inserts into the empty field of the database table
We were tossed all night by a Kong performance bug
Learning transformer: overall architecture and Implementation
[don't bother to strengthen learning] video notes (IV) 2. Dqn realizes maze walking
The difference between & &, | and |