PHP 7 is certainly a giant leap for the PHP community. Version 7 improved the OOP concepts and functionality of the language, thereby doing away with one of the most-cited shortcomings of the language. However, even for veteran PHP coders, making the transition from the procedural PHP 4 to OOP PHP 7 is a big deal.
At a Glance
Old habits are hard to break, especially for PHP programmers who have amassed a significant library of scripts for almost every conceivable web development challenge. Moving away from this dependable base to the untried waters of OOP is a daunting prospect.
Luckily, help is at hand in the form of books that target specific segments of PHP community from novice to expert. This PHP 7 ebook review introduces an excellent book written for PHP experts who want to master PHP 7.
PHP 7 Explained starts with the history of PHP versions in the first two chapters. It then covers the internals of PHP 7 in Chapter 3 and moves on to installing PHP 7 for various flavors of Linux, MacOS X, and MS Windows.
The real meat of the ebook starts from Chapter 5 that highlights the issues that could result in broken code in PHP 7. Chapter 6 introduces the type system of PHP 7 in detail. Chapter 7 offers concise introduction to features of PHP 7 that makes life easier for PHP developers. Chapter 8 covers the new features introduced in PHP 7. Chapter 9 discusses the extended features of PHP 7. Chapter 10 is all about the error handling capabilities of PHP 7.
Chapter 11 discusses the changes and improvements for Windows-based PHP development. Chapter 12 covers the changes made in the break mechanism of PHP7. Chapter 13 highlights the functionality that has been removed and is no longer available in PHP 7. Finally, Chapter 14 is a brief conclusion that neatly sums up the main premise of this PHP 7 focused ebook.
Five copies of the books are available at a 25% discount. Use the Coupon Code : php7-cloudways
This offer is available on first come, first serve basis.
Buy Link: Official Page
Themes & Topics
The most important thing to remember about PHP 7 Explained is that it is written for experienced PHP programmers who are comfortable with the advanced concepts of the language. There is little holding of hands or spoon-feeding (aside from a succinct chapter on how to install PHP in several development environments) that is a familiar chapter in almost every PHP development ebook.
Instead, the writers have discussed specific concepts and changes in all major areas of the PHP 7. This style, evident from Chapter 5 onward, is ideally suited for PHP developers who would like to know the changes and new features of PHP 7 without wading through pages of theory.
Chapter 2 offers a brief introduction to the new features of PHP 7. The section titled The Price You Pay, in particular, briefly discusses the features such and new reserved words and parameter handling.
The ebook covers several important changes in the way PHP 7 processes code and executes bytecode. The authors have gone in some detail about the way in which the PHP compiler works, with particular references to the lexical and semantic analysis of PHP code. The section on bytecode covers the changes in cache mechanism. Similarly, when discussing the native PHP debugger (PHPDBG), the authors have highlighted the new and enhanced capabilities including code coverage.
Realizing the fact that MS Windows is now an important development environment for PHP, the PHP 7 ebook has dedicated an entire chapter to Windows-specific changes in PHP 7. Chapter 11 covers these changes and provides code snippets to support the explanation of the features.
Whenever the underlying version of the language changes, the code invariably misbehaves and mysterious error messages crop up very frequently. In such instances, PHP developers would benefit from two entire chapters (Chapter 5 on issues that break PHP 7 code and Chapter 13 on features no longer supported in PHP 7). Similarly, the book dedicated three additional chapters (7, 8 and 9) to the new and extended features of PHP 7.
Type system has always been an important aspect of PHP. Chapter 6 of PHP 7 Explained first explains the basic mechanism of type system in PHP and then goes in some detail about the new Super-Type iterable and PHP_INT_MIN constant.
PHP 7 has a completely new take on error handling in the backdrop of OOP. In Chapter 10, the authors have discussed the major changes in PHP 7 error handling. The discussion covers Engine and Parse errors, improvements in exception handling and the use of a single catch statement for multiple exceptions.
Similarly, PHP 7 implements several new features in the situation that require the use of break concept. In particular, the book discusses several cases of break statements including division by zero exception, handling of float value, invalid strings and JSON encoding and handling.
PHP 7 Explained is a concise introduction to all the new features and updates of PHP 7. The best thing about this PHP 7 ebook is the concise but thorough coverage of the features. Supported by code snippets, the chapters offer relevant information in easy-to-scan and easy-to-digest format. In particular, the books answers the important question, “why there is no PHP 6?”
Shahroze is a PHP Community Manager at Cloudways - A Managed PHP Hosting Platform. He’s always in search of new frameworks and methods to implement them. Besides his coding life, he loves movies and playing soccer with friends. You can email him at email@example.com
Create PHP websites without the worry of server management.
Deploy your PHP app on optimized PHP hosting servers.