Testing Randomness of PHP Random Number Functions
Let's take a look at the different ways to generate a random number in PHP.
Read more [php.watch]
Let's take a look at the different ways to generate a random number in PHP.
Read more [php.watch]
– doeken.org - submitted by Doeke Norg
It's time to replace your mocked event dispatchers with a real one.
Read more [doeken.org]
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
– tighten.com - submitted by Jamison Valenta
If you're running a Laravel application in the 5's, have a legacy application bootstrapped inside Laravel, don't have any tests, or are staring in silent terror at just how long ago your production server's PHP version hit its end-of-life, this post is for you!
Read more [tighten.com]
– mateusguimaraes.com - submitted by Mateus Guimarães
Learn how I was able to easily scale an application to handle hundreds of millions of jobs using nothing but Laravel, Redis and MySQL
Read more [mateusguimaraes.com]
– ryangjchandler.co.uk - submitted by Ryan Chandler
A blog post about an experiment that converts PHP to Rust and is capable of generating native binaries.
Read more [ryangjchandler.co.uk]
– stitcher.io - submitted by Brent
You might be afraid of this change, but most likely this won't affect you.
Read more [stitcher.io]
– aschmelyun.com - submitted by Andrew Schmelyun
If you've been working with PHP regularly, chances are you've run across an Interface, Trait, or Abstract Class. At first glance, they might appear to have a few similarities between them, and it can be hard to make out their differences and use cases.
Read more [aschmelyun.com]
While working on the upcoming Oh Dear redesign, I noticed that list that displays all sites of a team was very slow.
To display that list, a lot of queries were used. With a couple of minor adjustments, I could reduce the number of queries needed to just a single one, solving the performance problem.
In this small blog post, I'd like to share one of the techniques I used.
The best dependency manager just got a little bit better.
Read more [php.watch]
Here's an update on what the PHP core contributors have been doing these past few weeks.
Read more [thephp.foundation]
– arunas.dev - submitted by Arunas
You'll learn the difference between "tactical" and "strategic" programming, and why choosing the right approach is important in the long run.
Read more [arunas.dev]
Thomas Votruba explains how you can go about this.
Read more [tomasvotruba.com]
Povilas demonstrates a nice little features that was recently added to Laravel.
PHP 8.2 is scheduled to be released on the 24th of Nov, 2022. Of course, meanwhile, you may test the new features, syntax changes, and other improvements in your local environment.
Read more [nunomaduro.com]
– arunas.dev - submitted by Arunas
Before we learn strategies for better software design, we must understand our enemy - complexity. Let’s define complexity, how to spot it, and what causes it.
Read more [arunas.dev]
Composer 2.4 features scanning the installed and new packages for known security vulnerabilities. When a new package is installed, or an existing package is updated, Composer looks up the package version numbers on known security vulnerability announcements, and reports if there are any known vulnerabilities in the list of packages.
Read more [php.watch]
When developing web applications, you probably encounter a lot of places where someone needs to select one or more options in a select or multi-select. These select boxes always need a list of options with labels and values.
In one of our projects, we had options being generated in lots of places. Sometimes these lists of options were the same, leading to a lot of code duplication. Even worse, in some cases, different formats were used to output the same options.
That's why we've created a new package called spatie/laravel-options. It will take a resource which can create options such as an enum, a list of models or even a plain array. And will always create a standardized array of options you can use within your frontend application.
Did you know that DateImmutable isn't really immutable?
Read more [matthiasnoback.nl]
We've released a new package called spatie/laravel-sql-commenter. This one can add comments to SQL queries. These comments allow you to easily pinpoint the origin of a query when looking at your query log.