PHP 8 Objects, Patterns, and Practice: Mastering Oo Enhancements, Design Patterns, and Essential Development Tools 6/e

Zandstra, Matt

  • 出版商: Apress
  • 出版日期: 2021-04-03
  • 售價: $1,930
  • 貴賓價: 9.5$1,834
  • 語言: 英文
  • 頁數: 833
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484267907
  • ISBN-13: 9781484267905
  • 相關分類: PHPDesign Pattern
  • 立即出貨 (庫存=1)



Learn how to develop elegant and rock-solid systems using PHP, aided by three key elements: object fundamentals, design principles, and best practices. The 6th edition of this popular book has been fully updated for PHP 8, including attributes, constructor property promotion, new argument and return pseudo-types, and more. It also covers many features new since the last edition including typed properties, the null coalescing operator, and void return types. This book provides a solid grounding in PHP's support for objects, it builds on this foundation to instill core principles of software design and then covers the tools and practices needed to develop, test, and deploy robust code.

PHP 8 Objects, Patterns, and Practice begins by covering PHP's object-oriented features. It introduces key topics including class declarations, inheritance, and reflection. The next section is devoted to design patterns. It explains the principles that make patterns powerful. You'll cover many of the classic design patterns including enterprise and database patterns. The last segment of the book covers the tools and practices that can help turn great code into a successful project. The section shows how to manage multiple developers and releases with git, and how to manage builds and dependencies with Composer. It also explores strategies for automated testing and continuous integration.

After reading and using this book, you will have mastered object-oriented enhancements, design patterns, and the essential development tools available for PHP 8.

What You Will Learn

  • Work with object fundamentals: write classes and methods, instantiate objects, and create powerful class hierarchies using inheritance
  • Master advanced object-oriented features, including static methods and properties, managing error conditions with exceptions, and creating abstract classes and interfaces
  • Understand and use design principles to deploy objects and classes effectively in your projects
  • Discover a set of powerful patterns that you can implement in your own projects
  • Guarantee a successful project including unit testing; version control and build, installation, and package management; and continuous integration

Who This Book Is For

Anyone with at least a basic knowledge of PHP who wants to use its object-oriented features in their projects. It is also for PHP coders who want to learn about the practices and tools (version control, testing, continuous integration, etc) that can make projects safe, elegant and stable.






學習如何使用 PHP 開發優雅且穩固的系統,並借助三個關鍵元素:物件基礎、設計原則和最佳實踐。這本受歡迎的書籍的第六版已經完全更新為 PHP 8,包括屬性、建構函式屬性提升、新的引數和返回偽類型等。它還涵蓋了自上一版以來的許多新功能,包括類型屬性、空合併運算子和無返回類型。本書提供了對 PHP 對象支持的扎實基礎,並在此基礎上建立軟體設計的核心原則,然後介紹開發、測試和部署強大代碼所需的工具和實踐方法。

《PHP 8 物件、模式和實踐》首先介紹了 PHP 的面向對象特性。它介紹了包括類聲明、繼承和反射在內的關鍵主題。接下來的部分專門介紹了設計模式。它解釋了使模式強大的原則。您將學習許多經典的設計模式,包括企業和數據庫模式。本書的最後一部分介紹了可以幫助將優秀代碼轉化為成功項目的工具和實踐方法。該部分展示了如何使用 git 管理多個開發人員和版本,以及如何使用 Composer 管理構建和依賴關係。它還探討了自動化測試和持續集成的策略。

閱讀並使用本書後,您將掌握面向對象的增強功能、設計模式以及 PHP 8 可用的基本開發工具。


- 使用物件基礎:編寫類和方法、實例化物件,並使用繼承創建強大的類層次結構
- 掌握高級面向對象功能,包括靜態方法和屬性、使用異常管理錯誤條件,以及創建抽象類和介面
- 理解並使用設計原則,在項目中有效部署物件和類
- 發現一組強大的模式,可以在自己的項目中實施
- 確保項目的成功,包括單元測試、版本控制和構建、安裝和套件管理,以及持續集成


本書適合至少具備基本 PHP 知識並希望在項目中使用其面向對象特性的任何人。它還適用於希望了解可以使項目安全、優雅且穩定的實踐和工具(版本控制、測試、持續集成等)的 PHP 程式設計師。


Matt Zandstra has worked as a web programmer, consultant, and writer for over two decades. He is the author of SAMS Teach Yourself PHP in 24 Hours (three editions) and is a contributor to DHTML Unleashed. He has written articles for Linux Magazine, Zend, IBM DeveloperWorks, and php-architect Magazine, among others. Matt was a senior developer/tech lead at Yahoo and API tech lead at LoveCrafts. Matt works as a consultant advising companies on their architectures and system management, and also develops systems primarily with PHP, and Java. Matt also writes fiction.


Matt Zandstra在網頁程式設計師、顧問和作家的領域已有超過二十年的經驗。他是《SAMS Teach Yourself PHP in 24 Hours》(三個版本)的作者,也是《DHTML Unleashed》的貢獻者。他曾為Linux Magazine、Zend、IBM DeveloperWorks和php-architect Magazine等刊物撰寫文章。Matt曾在Yahoo擔任高級開發人員/技術主管,並在LoveCrafts擔任API技術主管。他現在作為顧問為公司提供架構和系統管理方面的建議,同時主要使用PHP和Java開發系統。此外,Matt還寫小說。