PHP is experiencing a renaissance, though it may be difficult to tell with all of the outdated PHP tutorials online. With this practical guide, you’ll learn how PHP has become a full-featured, mature language with object-orientation, namespaces, and a growing collection of reusable component libraries.
Author Josh Lockhart—creator of PHP The Right Way, a popular initiative to encourage PHP best practices—reveals these new language features in action. You’ll learn best practices for application architecture and planning, databases, security, testing, debugging, and deployment. If you have a basic understanding of PHP and want to bolster your skills, this is your book.
- Learn modern PHP features, such as namespaces, traits, generators, and closures
- Discover how to find, use, and create PHP components
- Follow best practices for application security, working with databases, errors and exceptions, and more
- Learn tools and techniques for deploying, tuning, testing, and profiling your PHP applications
- Explore Facebook’s HVVM and Hack language implementations—and how they affect modern PHP
- Build a local development environment that closely matches your production server
......(更多)
Josh Lockhart is the creator of the Slim Framework for PHP. He also created and maintains PHP The Right Way, a popular initiative in the PHP community to encourage best practices and provide quality information. Josh is a senior developer at New Media Campaigns, a full service web design, development, and marketing agency in Carrboro, North Carolina.
......(更多)
Part I Language Features
Chapter 1 The New PHP
Chapter 2 Features
Part II Good Practices
Chapter 3 Standards
Chapter 4 Components
Chapter 5 Good Practices
Part III Deployment, Testing, and Tuning
Chapter 6 Hosting
Chapter 7 Provisioning
Chapter 8 Tuning
Chapter 9 Deployment
Chapter 10 Testing
Chapter 11 Profiling
Chapter 12 HHVM and Hack
Chapter 13 Community
Appendix: Installing PHP
Appendix: Local Development Environments
......(更多)
命名空间在PHP5.3.0中引入,是一个很重要的工具,其作用是按照一种虚拟的层次结构组织PHP代码,这种层次结构类似操作系统中文件系统的目录结构。 现代的PHP组建和框架都放在各自的全局唯一的厂商命名空间中,以免与其他厂商使用的常见类名冲突。 命名空间(或子命名空间)的作用是封装和组织相关的PHP类,就像在文件系统中把相关的文件放在同一个目录中一样。
......(更多)