PHP這門(mén)編程語(yǔ)言正在經(jīng)歷一場(chǎng)復(fù)興,雖然這點(diǎn)從網(wǎng)上各種過(guò)時(shí)PHP教材還很難看出來(lái)。在這本《現(xiàn)代PHP(影印版 英文版)》的實(shí)用指導(dǎo)的幫助下,讀者會(huì)看到PHP已經(jīng)變成一門(mén)功能齊全、成熟的編程語(yǔ)言,包括支持面向?qū)ο蟆⒚臻g以及一套不斷擴(kuò)大的可復(fù)用組件代碼庫(kù)。
作者洛克哈特是“PHP The Right Way”的創(chuàng)始人(這是一項(xiàng)廣受歡迎的運(yùn)動(dòng),旨在鼓勵(lì)PHP實(shí)踐),他用實(shí)例闡述了這門(mén)編程語(yǔ)言中的新特性。你將學(xué)到各種實(shí)踐,包括應(yīng)用架構(gòu)以及規(guī)劃、數(shù)據(jù)庫(kù)、安全、測(cè)試、調(diào)試和應(yīng)用部署。如果你已有PHP基礎(chǔ)并且想提升技能,這就是你該看的書(shū)。
洛克哈特,開(kāi)發(fā)了Slim框架,這是一個(gè)PHP微型框架,適合快速開(kāi)發(fā)Web應(yīng)用和API。喬希還是“PHP之道”的發(fā)起人和當(dāng)前的維護(hù)者。喬!ぢ蹇斯厥荖ew Media Campaigns的開(kāi)發(fā)者,這個(gè)機(jī)構(gòu)位于北卡羅來(lái)納州卡勃羅市,提供全方位的服務(wù),包括Web設(shè)計(jì)、開(kāi)發(fā)和營(yíng)銷(xiāo)。他熱衷于使用HTML、CSS、PHP、JavaScript、Bash和各種內(nèi)容管理框架開(kāi)發(fā)應(yīng)用。
Preface
Part Ⅰ. Language Features
1.The New PHP
Past
Present
Future
2.Features
Namespaces
Why We Use Namespaces
Declaration
Import and Alias
Helpful Tips
Code to an Interface
Traits
Why We Use Traits
How to Create a Trait
How to Use a Trait
Generators
Create a Generator
Use a Generator
Closures
Create
Attach State
Zend OPcache
Enable Zend OPcache
Configure Zend OPcache
Use Zend OPcache
Built-in HTTP server
Start the Server
Configure the Server
Router Scripts
Detect the Built-in Server
Drawbacks
What's Next
Part Ⅱ.Good Practices
3.Standards
PHP-FIG to the Rescue
Framework Interoperability
Interfaces
Autoloading
Style
What Is a PSR?
PSR-1: Basic Code Style
PSR-2: Strict Code Style
PSR-3: Logger Interface
Write a PSR-3 Logger
Use a PSR-3 Logger
PSR-4: Autoloaders
Why Autoloaders Are Important
The PSR-4 Autoloader Strategy
How to Write a PSR-4 Autoloader (and Why You Shouldn't)
4.Components
Why Use Components?
What Are Components?
Components Versus Frameworks
Not All Frameworks Are Bad
Use the Right Tool for the Job
Find Components
Shop
Choose
Leave Feedback
Use PHP Components
5.Good Practices
Part Ⅲ.Deployment, Testing, and Tuning
6.Hosting
7.Provisioning
8.Tuning
9.Deployment
10.Testing
11.Profiling
12.HHVMand Hack
13.Community
A.Installing PHP
B.Local Development Environments
Index