1. 关于大小写
PHP内置的函数和结构是不区分大小写的。
如:
HelloPHP
echo("Hello PHP");
ECHO("Hello PHP");
Echo("Hello PHP");
?>
这三者的效果是一样的。
其他,用户自定义的类名和方法名也是不区分大小写的。
例如:
HelloPHP
function Test()
{
echo("Hello PHP");
}
Test();
TEST();
test();
?>
但是变量是区分大小写的。
2. 变量
这里只提一句,哪怕稍微接触过一些PHP的人都会知道,PHP声明变量以美元符($)开头。
在前面的例子中,我们也可以看到。
3. 类型判断函数
在PHP中,一共有八种数据类型:分别为整型,浮点型,字符串,布尔型,数组,对象,NULL和资源类型。
判断类型时有一个很重要的函数,格式为is_XX。
例如:
$intTest=1;
echo(is_int($intTest));
echo("
");
$stringTest="Test";
echo(is_string($stringTest));
echo("
");
echo(is_int($stringTest));
?>
PHP内置的函数和结构是不区分大小写的。
如:
复制代码 代码如下:
echo("Hello PHP");
ECHO("Hello PHP");
Echo("Hello PHP");
?>
这三者的效果是一样的。
其他,用户自定义的类名和方法名也是不区分大小写的。
例如:
复制代码 代码如下:
function Test()
{
echo("Hello PHP");
}
Test();
TEST();
test();
?>
但是变量是区分大小写的。

2. 变量
这里只提一句,哪怕稍微接触过一些PHP的人都会知道,PHP声明变量以美元符($)开头。
在前面的例子中,我们也可以看到。
3. 类型判断函数
在PHP中,一共有八种数据类型:分别为整型,浮点型,字符串,布尔型,数组,对象,NULL和资源类型。
判断类型时有一个很重要的函数,格式为is_XX。
例如:
复制代码 代码如下:
$intTest=1;
echo(is_int($intTest));
echo("
");
$stringTest="Test";
echo(is_string($stringTest));
echo("
");
echo(is_int($stringTest));
?>
Statement
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
Assassin's Creed Shadows: Seashell Riddle Solution
1 months agoByDDD
What's New in Windows 11 KB5054979 & How to Fix Update Issues
3 weeks agoByDDD
Where to find the Crane Control Keycard in Atomfall
1 months agoByDDD
How to fix KB5055523 fails to install in Windows 11?
2 weeks agoByDDD
InZoi: How To Apply To School And University
3 weeks agoByDDD

Hot Tools

Atom editor mac version download
The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools
