php相关语法和概念

来源:互联网 发布:java异或 编辑:程序博客网 时间:2024/06/05 02:57
php 支持八种原始类型。
四种标量类型:
boolean(布尔型)
integer(整型)
float(浮点型,也作“double”)
string(字符串)
两种复合类型:array(数组)object(对象)最后是两种特殊类型:resource(资源)NULL
为了确保代码的易读性,本手册还介绍了一些伪类型:mixednumbercallback
语法:
语法有三种:
//comment
/* comment */
# comment
基本的 "Control Structures":
* if ... else
if (condition == true) ;
* if ... else then
if (condition == true)
else if (condition2 == true) ;
一个PHP实例:
<html>
<head>
<title>First program</title>
</head>
<body>
<?php
echo "hello world";
?>
</body>
</html>
原创粉丝点击