Home > php教程 > php手册 > body text

php基础-常量-变量相关的基础函数

WBOY
Release: 2016-06-13 09:24:44
Original
760 people have browsed it

php基础-常量-变量相关的基础函数

注释语句


//单行


# 单行


/*
多行注释
*/


/**
* 文档注释
*
*/


常量定义


自定义常量 常量名区分大小写
系统的魔术常量不区分大小写 __DIR__ __dir__




变量定义
变量名是区分大小写
变量名声明时用$符号开头, 而且要符合变量名的命名规则






$i;
var_dump($i);


$i = 'ok';
var_dump($i);




$i = "Hello";
var_dump($i);




$i = 20;
var_dump($i);




$i = 20.5;
var_dump($i);


//变量类型 和javascript 变量类型相似,是变体类型
$i = true;
var_dump($i);






函数名 类名 不分区大小写






php基础函数


phpinfo();
var_dump($i);
echo gettype($i);
define('AGE',200);
defined('AGE');


realpath()
dirname();
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!