ebook img

Front Line PHP Building modern applications with PHP 8 PDF

250 Pages·2020·1.156 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Front Line PHP Building modern applications with PHP 8

Front Line PHP Building modern applications with PHP 8 Brent Roose Front Line PHP Building modern applications with PHP 8 Brent Roose Published 2020 by Spatie. Reviewers: Freek Van der Herten, Matthias Noback, Stephen Moon, Wouter Brouwers Design & composition: Sebastian De Deyne, Willem Van Bockstal This book is a distillation of the lessons learned by the Spatie team the past three years: Adriaan, Alex, Brent, Jef, Freek, Niels, Rias, Ruben, Sebastian, Willem, and Wouter. Version 5bc80b1-4 To report errors, please send a note to [email protected]. Created in Belgium Table of Contents Foreword ..........................................................................................................................7 Preface .............................................................................................................................9 PART I: PHP, the Language ...........................................................................................10 01. PHP Today 11 02. New Versions 13 03. PHP's Type System 25 04. Static Analysis 43 05. Property Promotion 53 06. Named Arguments 65 07. Attributes 77 08. Short Closures 95 09. Working with Arrays 99 10. Match 107 PART II: Building With PHP .......................................................................................... 114 11. Object Oriented PHP 115 12. MVC Frameworks 137 13. Dependency Injection 155 14. Collections 167 15. Testing 171 16. Style Guide 179 PART III: PHP In Depth .................................................................................................190 17. The JIT 191 18. Preloading 201 19. FFI 215 20. Internals 219 21. Type Variance 225 22. Async PHP 231 23. Event Driven Development 235 In Closing .....................................................................................................................247 Foreword By Roman Pronskiy PHP has changed the world. More than 5 million developers are now using this lan- guage worldwide to create a variety of applications. But the world is changing PHP as well. Rasmus Lerdorf, the creator of the language, once noted that "a good solution should steal/borrow existing technology". And this is true. PHP takes the best ideas from other ecosystems and improves on them. It's been 5 years since the release of PHP 7.0. In this time, as the community has matured and needed new features, the language team has been listening to the com- munity and implementing the features. This is what has led PHP to introduce stricter typing, more concise syntax, static analyzers, etc. “It is not the strongest of the species that survives, nor the most intelligent that sur- vives. It is the one that is most adaptable to change.” - Leon C. Megginson’s interpre- tation of Darwin’s ideas is an insight that guides PHP year after year. I was still in school when I first saw PHP, and at the time I had no idea that I would go on to work with it professionally. Back then, in 2004, the main problem the internet had was searching for information. Today, because so much information is readily available, the problem is not searching information but filtering and identifying what is useful. It is, to lean on an old cliché, like looking for a $needle in a $haystack – or was it the other way around? Anyway, how do we dig up the really valuable things in these endless feeds mixed with ads and notifications? 8 It's impossible to give a comprehensive answer for all areas, but for PHP the answer is here – Front Line PHP. This book gives a core of knowledge about everything that concerns the PHP’s devel- opment today and in the near future. This is not a paraphrase of documentation, but rather a thoughtful and meaningful development experience in short and clear for- mulations. It offers a fresh look at the newest features of the language, as well as at some that are already familiar. Writing quality code in PHP has simultaneously become both easier and more com- plicated. On the one hand, there are many new features and tools at a developer's disposal. On the other hand, you need to juggle them elegantly in order to solve real problems beautifully and easily. That’s what this book is really about. Complex things in simple words. How to apply them. Principles and practices. It is a fishing rod, in a sea full of fish. There has never been a better time to work with PHP. And this book is one of the best ways to learn it. I hope you enjoy it!

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.