Free Downloads
Modern PHP: New Features And Good Practices

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 closuresDiscover how to find, use, and create PHP componentsFollow best practices for application security, working with databases, errors and exceptions, and moreLearn tools and techniques for deploying, tuning, testing, and profiling your PHP applicationsExplore Facebook’s HVVM and Hack language implementations—and how they affect modern PHPBuild a local development environment that closely matches your production server

Paperback: 270 pages

Publisher: O'Reilly Media; 1 edition (March 1, 2015)

Language: English

ISBN-10: 1491905018

ISBN-13: 978-1491905012

Product Dimensions: 7 x 0.6 x 9.2 inches

Shipping Weight: 1.1 pounds (View shipping rates and policies)

Average Customer Review: 4.7 out of 5 stars  See all reviews (34 customer reviews)

Best Sellers Rank: #48,333 in Books (See Top 100 in Books) #3 in Books > Computers & Technology > Web Development & Design > Content Management #8 in Books > Computers & Technology > Programming > Web Programming > PHP #9 in Books > Computers & Technology > Web Development & Design > Web Services

I've developed PHP applications since version 4.0, back in the days when all methods were public. Now, most of those codes are considered legacy. Before reading this book, there were many gaps in my understanding of PHP 5, not only in its new features, but also in the new best practices. This book alone helped me to upgrade myself to PHP 5.6 confidently.The author knows how to present stuff clearly. By giving real world examples, he wants to make sure you really get it. The book is easy to read and very well written. However, it is assumed the reader already knows how to code in PHP; it is not a book for beginners, or to learn PHP's basics.Unlike online tutorials, the examples in this book are modern, for example, the author uses a component from Symfony framework to demonstrate the Namespace usage. Not only the author explains each new feature with clear examples, but he also covers best practices for each feature.The author is well-known because of his work at, you can get an idea on his opinions on this website. To conclude, I highly recommend this book.

Excellent ROI. I have been a web dev for almost 20 years and was a "hard-core" PHP guy for some of those years, then didn't touch PHP for over 8 years. PHP grew up while I was off in Python land! In my opinion, Josh Lockhart's Modern PHP is a must-read for any PHP programmer. Sure there are lots of things he could go into deeper, but this book was needed--an excellent overview of almost everything a PHP developer needs to know from installing and configuring PHP and web servers, code style, recommended directory structures, the newer supported object oriented concepts, testing, debugging, profiling, deployments, using Composer, and even a good overview of HHVM and Hack--enough to help you know if you want to dive in more at this time.I will surely be referring to this book to lean on some of Josh's recommendations as I setup new projects.A little additional Josh Lockhart plug--I learned about him when I chose to use his Slim PHP micro framework in my latest project. That project was rolled into production about 90 days ago to very happy customers. I am delighted with Slim. It does the very basic plumbing I'd rather not code and does it very well. Then it stays the heck out of my way so I can write my own PHP to do what I need to do.

This book does a great job of explaining traits, interfaces and a number of other language features I was fuzzy on. It even goes through configuring a server with nginx, deploying your project and more admin stuff I needed to improve on. I was really excited to see that stuff covered so well. It's also cool to learn a bit about HHVM and Hack. Great book, highly recommended.

Overall this is a great concept for a book, and I like that it's a lean book. At the same time, I wish the author had spent a bit more time on some topics. He does a very fast overview of most topics, and though some topics can be explained in a page (generators), he could have spent more time on others that require a bit more explaining (closures and attaching state). So in some places it's great, and in others it mainly serves to tip me off that I need to go... somewhere else... and learn about Topic X.

This book is for Intermediate to Advanced PHP writers. I think beginners would find some value in it, being exposed to some of the more standard practices of PHP, but it might require a second glance once you've actually written some code for a while. I would just like to thank the author for touching a lot of amazing points about modern PHP in a fun and well organized way. It was actually a fun, interesting read from start to finish. I think that it only languished in technical detail when and for as long as it needed to. I went away from PHP around 5.3 and came back months before PHP 7 came on the scene. This book was exactly what I needed to catch up and see what amazing things were happening in PHP and the community. I could see it being a great read, too, if you're fairly familiar with PHP.

I was recently asked to evaluate web development options for a start up and needed to get my head around modern PHP. This book was one of the books I purchased for that purpose. No book is perfect and this book has gaps, but it is something I would recommend to those wanting to get into PHP. The utility probably declines for experienced PHP programers, but there could still be some gems. I also purchased and reviewed Learning PHP, MySQL & JavaScript: With jQuery, CSS & HTML5 (Learning Php, Mysql, Javascript, Css & Html5). Lockhart's book (Modern PHP) goes along way towards addressing my views on the short comings of Nixon's tomb on web technologies (also a good book). There are areas that could be improved in Modern PHP. The appendix on frameworks is a bit light in my opinion and would benefit from more development. A discussion of IDEs would also be useful, but these issues are not show stoppers. I enjoyed the section on frameworks and components and I found the discussion on Laravel verses other frameworks helpful, but I just wanted more details. Don't expect a glossy presentation or extensive code examples. Instead this book provides valuable insights and is worth every cent. This book together with Nixon's book is a good combination. I've definitely made good use of this book and am looking forward to grabbing an O'Reilly code Cookbook. If you know programming, but are not an experienced PHP programer and need to get your head around the subject matter quickly then this book should be at the top of your reading list.

PHP: Learn PHP In A DAY! - The Ultimate Crash Course to Learning the Basics of the PHP In No Time (PHP, PHP Programming, PHP Course, PHP Development, PHP Books) PHP: QuickStart Guide - The Simplified Beginner's Guide To PHP (PHP, PHP Programming, PHP5, PHP Web Services) Php: Learn PHP In A DAY! - The Ultimate Crash Course to Learning the Basics of PHP In No Time (Learn PHP FAST - The Ultimate Crash Course to Learning ... of the PHP Programming Language In No Time) Modern PHP: New Features and Good Practices PHP: MySQL in 8 Hours, For Beginners, Learn PHP MySQL Fast! A Smart Way to Learn PHP MySQL, Plain & Simple, Learn PHP MySQL Programming Language in Easy Steps, A Beginner's Guide, Start Coding Today! PHP: MYSQL 100 Tests, Answers & Explanations, Pass Final Exam, Job Interview Exam, Engineer Certification Exam, Examination, PHP programming, PHP in easy steps: A Beginner's Guide PHP Cookbook: Solutions and Examples for PHP Programmers Beginners Guide On PHP Programming: Quick And Easy Guide To Learn PHP With My-SQL Web Content Management: Systems, Features, and Best Practices Learning PHP, MySQL & JavaScript: With jQuery, CSS & HTML5 (Learning Php, Mysql, Javascript, Css & Html5) Zend PHP Certification Guide 5.5: A programmers guide to PHP PHP: Crash Course - The Ultimate Beginner's Course to Learning PHP Programming in Under 12 Hours Five Good Minutes: 100 Morning Practices to Help You Stay Calm and Focused All Day Long (The Five Good Minutes Series) Good Gut: The Next Thing You Should Do If You Want to Heal Your Gut and Improve Your Intestinal Health (good gut guide, gut health, good gut diet) Gay Marriage: Why It Is Good for Gays, Good for Straights, and Good for America The Looneyspoons Collection: Good Food, Good Health, Good Fun! Fountains and Water Features: From Ancient Springs to Modern Marvels iPhone 6: The Complete iPhone 6 Beginners Guide - Learn How To Use Your iPhone 6, Detailed User Manual, Plus New iPhone 6 & iPhone 6s Hidden Features, Tips And Tricks! (Apple, IOS, Yosemite) Oracle Database 11g New Features (Oracle Press) Microsoft® Exchange Server 2010 Best Practices (IT Best Practices - Microsoft Press)