DB
Search by
Email
Github
Twitter
Blog Archive
July 13, 2021
1 minute
Goodbye strpos and strstr: str_contains in PHP8
The frustration of having to use strpos and strstr to check if strings contain another string is over with PHP 8 and a great new string function called str_contains.
Read full story ->
June 30, 2021
1 minute
Solve blurry scaled images in Chrome
A very annoying new feature in Chrome in the last couple of months is that CSS scaled images are blurry when loaded. You can fix this by adding this style tag to your images.
Read full story ->
June 7, 2021
1 minute
Set a custom user agent with Laravel's Http Client
You can customize the user agent that Laravel sends with the withUserAgent call. It can often happen that a WAF or other security system will block curl, PHP and Guzzle based requests.
Read full story ->
June 1, 2021
3 minutes
Checking a remote hosts SSL expiry date with PHP
This simple function will return the number of days remaining on an SSL certificate, including potentially negative values if it's expired.
Read full story ->
May 29, 2021
1 minute
Prevent Lazy Loading in Laravel
A large majority of poor SQL performance in Laravel can be attributed to lazy loading. Queries that you think execute a single query may execute thousands.
Read full story ->
May 25, 2021
1 minute
Send HTTP requests in parallel with Laravel
A great performance tip for Laravel is the ability to send HTTP requests concurrently. This is especially useful when you are doing things like sending multiple webhooks and similar examples.
Read full story ->
← Newer Posts
Older Posts →