Modern PHP Cheat Sheet
A to-the-point summary of all awesome PHP features
Read more [front-line-php.com]
Posts tagged with best practices
A to-the-point summary of all awesome PHP features
Read more [front-line-php.com]
Here are a few best practices for working with a large tables.
Read more [42coders.com]
Join thousands of developers
Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.
No spam. Unsubscribe anytime. You can also follow me on X.
A few days ago, a new version of 1Password was released that is able to detect where a user can reset his or her password.
– doeken.org - submitted by Doeke Norg
Cloning is a nice way of creating a quick copy of an object. But there are some things you need to be aware of!
Read more [doeken.org]
Matthias Noback shares some considerations on when you could rely on PSR abstractions
Read more [matthiasnoback.nl]
A static analyzer helps you to find bugs in your code without even running it. Popular static analyzers for PHP are Psalm and PHPStan. In this post, we're going to look at what such a static analyzer can find in a two-year-old codebase.
Read more [flareapp.io]
I've been creating web applications for over 15 years now. It's only in the last five years that I've learned how to test an application automatically. I can safely say that there is no other technique that has improved the quality of my code more.
Let's go over what a test is and all the benefits it provides.
Read more [testing-laravel.com]
Native PHP functionality and having a good design in the first place provide everything you need to avoid a mocking library.
Read more [peakd.com]
Using Dinero, you can perform mutations, conversions, comparisons, format them extensively, and overall make money manipulation in your application easier and safer.
The docs also contain a few falsehoods many developers believe to be true about money.
Read more [v2.dinerojs.com]
Anna Filina shares how she goes about organizing small functions.
Read more [afilina.com]
Sarah Dayan throughouhly explains the differences between utility classes and inline styles
Read more [frontstuff.io]
We talk about cleverness as if it’s Just Bad, such as “clever code is harder to debug”. That’s going too far. Cleverness can lead to faster, safer, even clearer code.
Read more [www.hillelwayne.com]
My colleague Brent shares some thoughts on possible improvements to handling config values.
Read more [stitcher.io]
Matthias Noback wrote down some good testing advice.
Read more [matthiasnoback.nl]
Regular expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task. Here are some tips to improve and write better regular expressions in PHP.
Read more [php.watch]
Mohamed shows how you can deal with N+1 problems using the $with model attribute and the newly added Model::preventLazyLoading() method.
Benjamin Eberlei tells the story of a performance mistake that is quickly made even by experienced developers.
Read more [tideways.com]
Most developers have probably seen some complex conditionals in legacy code. In this video I show you how to refactor those.
An excellent post on the subject by Sarah Dayan.
Read more [frontstuff.io]