当前位置:网站首页>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 . |
边栏推荐
- & 和 &&、| 和 || 的区别
- 【笔记】什么是内核/用户空间 从CPU如何运行程序讲起
- What is the component customization event we are talking about?
- Re6: reading paper licin: a heterogeneous graph based approach for automatic legal stat identification fro
- [leetcode] 31. Next arrangement
- 【我的创作一周年纪念日】爱情是需要被纪念的,创作也是
- What is tiktok creator fund and how to withdraw it?
- Assignment operator (geritilent software - Jiuye training)
- Getting started with web security - open source firewall pfsense installation configuration
- 《动手学深度学习》(七) -- 边界框和锚框
猜你喜欢

Why does TCP shake hands three times instead of two times (positive version)

Leetcode102-二叉树的层序遍历详解

From single architecture to distributed architecture, there are many pits and bugs!
![[don't bother to strengthen learning] video notes (II) 2. Write a small example of Q learning](/img/b1/d5c869bc68ba273be2030202f94a55.png)
[don't bother to strengthen learning] video notes (II) 2. Write a small example of Q learning

Li Kou 300 longest increasing subsequence dynamic programming

MySQL基础篇(一)-- SQL基础

Cess test online line! The first decentralized storage network to provide multiple application scenarios

来阿里一年后我迎来了第一次工作变动....

Racecar multi-point navigation experiment based on ROS communication mechanism

Linked list - 19. Delete the penultimate node of the linked list
随机推荐
Map processing background management menu data
NVIDIA set persistent mode
Replace the function of pow with two-dimensional array (solve the time overrun caused by POW)
Ue5 film and television animation rendering MRQ layered learning notes
Linked list - 24. Exchange nodes in the linked list in pairs
[don't bother to strengthen learning] video notes (II) 2. Write a small example of Q learning
云原生(十二) | Kubernetes篇之Kubernetes基础入门
C#/VB. Net: convert word or EXCEL documents to text
Detailed explanation of the whole process of R & D demand splitting | agile practice
Makefile变量及动态库静态库
DSP development, using CCS software to establish engineering and burning
科目1-3
Promise basic summary
Data center: started in Alibaba and started in Daas
Dorissql syntax Usage Summary
Es search summary
Matlab各函数说明
财务数字化转型
web安全入门-开源防火墙Pfsense安装配置
TiFlash 源码阅读(五) DeltaTree 存储引擎设计及实现分析 - Part 2