PHP类型与大小写区分问题。
1. 关于大小写
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));
?>

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment