Home > Backend Development > PHP Tutorial > PHP学习笔记(一):基本语法之标记、空白、和注释_PHP

PHP学习笔记(一):基本语法之标记、空白、和注释_PHP

WBOY
Release: 2016-05-30 15:09:36
Original
908 people have browsed it

一、PHP 标记

1、XML风格

代码如下:




2、简短风格

代码如下:




3、script 风格

代码如下:



二、PHP 注释

1、单行注释: // (C++风格)
2、多行注释:/* */ (C风格)
3、单行脚本注释:# (shell风格)

Tips:注释一般写在代码上面

三、PHP 空白

1、空白间隔符

换行(回车)、空格、Tab(制表符)

2、约定习俗

代码片段(2行)、类(2行)、函数(1行)、函数变量与第一条语句(1行)、注释前(1行)

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template