php标识符
在PHP中,标识符用于命名变量、函数、类和其他编程元素。标识符必须遵循以下规则:
命名规则
保留关键字
以下单词是PHP中保留的,不能用作标识符:
立即学习“PHP免费学习笔记(深入)”;
abstract array as break callable case catch class clone const continue declare default die do echo else elseif empty enddeclare endwhile extends final finally for foreach function global goto if implements include include_once instanceof insteadof interface isset list new private protected public require require_once return static switch throw trait try unset use var while xor
示例
有效的标识符示例:
无效的标识符示例:
以上就是php标识符有哪些的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号