php基础学习常量篇

1.定义变量需要使用 define 关键字 其作用域是全局的

define("easy","every thing is easy is you want to do",true);
echo easy;
ECHO '
'; echo EASY; function test(){ echo easy; ECHO '
'; } test();

结果

every thing is easy is you want to do
every thing is easy is you want to do
every thing is easy is you want to do

你可能感兴趣的:(php基础学习常量篇)