Skip to Content
PHP编程:第4版
book

PHP编程:第4版

by Kevin Tatroe, Peter MacIntyre
January 2021
Intermediate to advanced
505 pages
9h 45m
Chinese
Publishing House of Electronics Industry
Content preview from PHP编程:第4版
20
2
语言基础
但是,注意不要试图嵌套块注释
$i = 9;
/*
$j = 10; /*
这是注释
*/
$k = 11;
Here is some comment text.
*/
在这种情况下,
PHP
试图执行语句
Here is some comment text.
,但这不是合法的语句,
所以执行失败并返回一个错误。
字面量
字面量是在程序中直接出现的数据值。下面这些都是
PHP
中的字面量
2001
0xFE
1.4142
"Hello World"
'Hi'
true
null
标识符
标识符是指一个简单的名称。在
PHP
中,标识符用于标识变量名、函数、常量和类。标
识符的第一个字符必须是一个
ASCII
字母(大写或小写)、下画线(
_
)或在
ASCII 0x7F
ASCII 0xFF
之间的任意字符。在首字符之后,这些字符以及数字
0
9
都是合法的。
变量名
变量名总是以一个美元符号(
$
)开始并且区分大小写。下面是一些合法的变量名
$bill
$head_count
$MaximumForce
$I_HEART_PHP
$_underscore
$_int
下面是一些不合法的变量名
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley
算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
Java持续交付

Java持续交付

Daniel Bryant, Abraham Marín-Pérez

Publisher Resources

ISBN: 9787121404634