๐ **Digging Code 6** is now live on @ProductHunt!
A complete refresh with redesigned pages, better content discovery, and a cleaner developer experience ๐
โจ Launch:
https://t.co/O994TAE9wd
Feedback and support are appreciated ๐
#Tech#PHP#Laravel#Design#UI#CSS#AI
match in #PHP isn't just "switch with ===".
The OPcache optimizer turns match expressions into a ZEND_MATCH opcode backed by a jump table. A single hash lookup picks the right arm in O(1).
switch compiles to a chain of CASE comparisons walked one by one. O(n) on the number of arms.
10 arms, hot loop? match wins by a wide margin. Same syntax cost, real speed difference.
Built this package to make database refreshing more flexible. Glad to see Laravel News sharing it with the community. Thanks, @ylynfatt! โก
#PHP#Laravel#SQL#Database
@PovilasKorop Great tip! I recently shared a tip about a subtle issue with Laravel's each collection method that many developers might not be aware of.
https://t.co/SMYDXCE9Bt
Would love to hear your thoughts on it.
๐ Two @laravelphp package launches are now live on @ProductHunt!
โก Easy Model
https://t.co/bCDnAV7vkS
โก Custom Fresh
https://t.co/LKt56ImkeO
Would love your support โค๏ธ
#Laravel#PHP#ProductHunt#OpenSource#GitHub
New @laravelphp tip on Digging Code ๐
Using Arrow Functions with Laravel Collections?
๐ก There's a subtle gotcha you should know about.
https://t.co/SMYDXCE9Bt
#Tech#Tips#PHP#Laravel
Timing attacks are real, and most devs don't protect against them.
When you compare two strings with === or strcmp(), #PHP stops at the first different byte. If the first character matches, it takes slightly longer than if it doesn't.
An attacker can measure response times to guess a secret character by character. HMAC token, API key, CSRF token... byte by byte, statistically.
hash_equals() was added in PHP 5.6 specifically for this. It always compares ALL bytes, regardless of where the first mismatch is. Constant time.
Same applies to #golang: use crypto/subtle.ConstantTimeCompare().
Same in #nodejs: crypto.timingSafeEqual().
If you're comparing secrets with == or ===, you may be leaking information through time!
Security reminder.
Any `.env` files on your computer left from older/testing/temp projects?
Those `.env` files have any ACTIVE prod credentials to any 3rd-parties?
Cleanup time.
Run this command to search, you may be surprised.
find ~ -name ".env*" -type f 2>/dev/null
introducing laravel moat
as an open source maintainer, recent supply chain attacks in the ecosystem made me want a simple cli to audit the security of my GitHub organizations and repositories
built in Rust. for any open source project on GitHub
๐ **Digging Code 6** is now live on @ProductHunt!
A complete refresh with redesigned pages, better content discovery, and a cleaner developer experience ๐
โจ Launch:
https://t.co/O994TAE9wd
Feedback and support are appreciated ๐
#Tech#PHP#Laravel#Design#UI#CSS#AI
Found this useful Laravel package!
mahmoudmohamedramadan/custom-fresh:
Specify the tables that you do not want to drop while refreshing the database. https://t.co/KxYwTpKjAT
@DevenPatil_007 I recently published Digging Code on @SellWithBoost. ๐
Digging Code is a developer-focused blog and tech hub featuring practical articles, engineering insights, tools, and continuous updates designed to help developers build better and grow faster.
https://t.co/Uy5tHVX1ZF
It might be a bit late, but Iโve released a new version of **Custom Fresh** that supports @laravelphp 13. ๐
This update also includes a redesigned logo and some structural improvements. ๐
๐https://t.co/mQplouKyTo
#PHP#Laravel#SQL#Database#GitHub