search
Homephp教程php手册关于php的一些特殊语法,有用函数等

1:单行注释里不要出现   ?> 
2:boolean类型,integer类型,float/double类型,string类型,  array类型,object类型(对象) ,resource类型资源,NULL类型
3:双引号"之间的变量会解析(可以用转义字符  \$    ),单引号的不会解析,原样输出
4:转义字符:\n 换行  \r回车   \t 制表符  \\反斜杠  \$   \'   \"   
5:界定符号 例如 $a = adfsdfsdfsdfsdfsd\$
std;
这个效果和双引号一样。包含的变量也会转换成值。
6:几乎所有的编程语言    ==  表示等于。。。。。记住。
7:is_null($a)  is系列函数(is_bool,is_string,is_int,is_integer,is_float,is_double,is_array,is_object,is_numeric)
8:unset掉变量变成null,不会返回值。
9:数据类型转换    (类型)$var     boolean string,integer,float array object   也可以通过settype函数转换    bool settype($var,$type)
10:define(‘ABC’,123);定义常量  defined('ABC')     用法:ABC ,或者constant('ABC') 或者$a = 'ABC' constant($a)   全用大写
11:$a = &$b;引用赋值
12:函数内部用全局变量用global声明。
13:函数的静态变量用static声明
14:可变变量$$a , $($a)
15:预定义常量:__FILE__,TRUE,FALSE,NULL,
16:预定义变量:$_SERVER
17:按引用传值。
18:函数返回多个值,用数组。。
19:如果某个函数或者操作必须使某个类型,必须先判断类型,再执行代码。foreach函数咯,什么的用is_array判断下。。。
 

本文链接http://www.cxybl.com/html/wlbc/Php/20130616/38660.html



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

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MantisBT

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.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool