#phpdev
Feeling uneasy about those static facade calls in Laravel? 🤔 Dive into understanding how they keep your code testable while looking so simple! #Laravel #PHPDev

https://laravelmagazine.com/understanding-laravel-facades-how-static-looking-calls-stay-testable
September 22, 2026 at 5:32 PM
🐘 Calling all PHP devs on Bluesky!

Join the PHP Dev Squad for the latest #PHP news, cool projects and community activities. Share what you're building, learn from others and stay in the loop.

You're invited 👇

#PHPDev #WebDev

dly.to/zzRWqw6ra15
Damien seguy invited you to PHP Dev | daily.dev
Welcome to PHP Dev, a dedicated space for sharing knowledge about PHP and its ecosystem (only PHP directly related). Help us find good articles and blogposts and provide links. Upvote or downvote, after reading, it's essential
dly.to
September 18, 2026 at 2:17 PM
PHP 8.4 tip: stop writing foreach-and-break to find one element. `array_find()` returns the first item matching a callback; `array_any()` and `array_all()` answer the yes/no questions.

Clearer intent, less boilerplate. New in 8.4.

#PHP #PHPDev #PHP84
September 8, 2026 at 1:08 PM
Laravel tip: reach for `Illuminate\Support\Carbon`, not `Carbon\Carbon`.

They look interchangeable, but Laravel's subclass is the one that carries your registered macros and works with `Carbon::setTestNow()`.

#PHP #Laravel #PHPDev
September 5, 2026 at 1:07 PM
PHP 8.4 tip: asymmetric visibility.

`public private(set)` lets any code read a property while only the class itself can write it. I don't need a one-line getter to protect a field anymore.

#PHP #PHPDev
September 1, 2026 at 1:02 PM
Honest question: what's actually stopping you from submitting a php[tek] 2026 talk?

Most people tell me "I'm not enough of an expert," and that instinct steers you wrong. First-time speakers get picked every year.

The CFP is open. https://cfp.phptek.io/

#phptek #PHP #PHPDev
August 31, 2026 at 1:02 PM
PHP tip: put `#[\Override]` on any method that's supposed to override a parent.

Rename the parent method or typo the child, and PHP throws at compile time instead of quietly defining a brand-new method that never runs.

Added in 8.3.

#PHP #PHPDev
August 29, 2026 at 1:18 PM
#PHP tip: make `declare(strict_types=1);` the first statement in every file.

A function that takes `int $x` accepts `"5"` and coerces it, and PHP will even turn `"5 apples"` into `5` with a warning. Turn it on, and passing `"5"` throws a TypeError right at the call.

#PHPDev
August 25, 2026 at 1:03 PM
Knowing what your app does is table stakes. Knowing what context your agents are seeing is harder. Waaseyaa now exposes Prometheus metrics and HTTP routes for agent context via the telescope package. github.com/waaseyaa/fra... #buildinpublic #phpdev
August 22, 2026 at 3:07 PM
in_array() uses loose comparison by default, so type juggling sneaks in.

in_array(0, ['admin', 'user']); // true (!)

0 == 'admin'` is true, so 0 "matches" a list of strings. Pass `true` as the third arg to fix it:

in_array(0, ['admin', 'user'], true); // false

#PHP #PHPDev
August 22, 2026 at 1:11 PM
Generic CMSes model genealogy as just another content type. The waaseyaa/genealogy package goes further: GenealogyPerson, GenealogyTree, pedigree services, and living-person semantics built in. github.com/waaseyaa/fra... #buildinpublic #phpdev
August 21, 2026 at 3:07 PM
The php[tek] 2026 call for papers is open. If you've got a talk in you, submit it. First-time speakers are welcome, and reviewers care about the idea, not your follower count. Don't reject yourself before the committee gets the chance. https://cfp.phptek.io/ #phptek #PHP #PHPDev
August 21, 2026 at 1:04 PM
I once found a login system comparing MD5 hashes with `==`. A hash starting with `0e` and then all digits reads as scientific notation, so PHP decides `0 == 0` and you're in without the password. #PHP #Security #PHPDev
August 19, 2026 at 1:03 PM
PHP 8.4 tip: array_find() finds the first match in one line.

Before: foreach, if, break, and a temp variable.

After:
#$ADMIN = array_find(#$USERS, fn(#$U) => $u->isAdmin());

Returns the first match or null.

#PHP #PHPDev #Laravel
August 18, 2026 at 1:06 PM
Confession: before I found parse_url() I hand-rolled URL parsing with strstr and explode like some kind of medieval craftsman. What code did you write from scratch that a single built-in function already handled?

#PHP #PHPDev
August 17, 2026 at 1:14 PM
Early in my career, I proved myself by writing code. Now I prove myself by deleting it. Half my "clever" helpers already existed in the stdlib; I just hadn't read the manual. Less code I own means less I have to maintain.

#CareerDev #PHPDev
August 16, 2026 at 1:01 PM
PHP tip: stop building query strings by hand.

Instead of:
"?q=" . #$Q . "&page=" . #$PAGE

Do this:
'?' . http_build_query(['q' => #$Q, 'page' => $page])

It URL-encodes everything for you, so spaces and & in values won't break your links.

#PHP #PHPDev #Laravel
August 15, 2026 at 1:08 PM
I spent years writing 12 lines of strstr() and explode() and regex to pull the host out of a URL. PHP has had parse_url() since PHP 4. Returns scheme, host, path, and query as an array. I feel a little dumb.

https://scott.keck-warren.com/blog/2026/stop-parsing-urls-manually-in-php/

#PHP #PHPDev
August 12, 2026 at 1:14 PM
I still see people reach for a `foreach` loop to pull one column out of an array of arrays. `array_column(#$ROWS, 'email')` does it in one line. Pass a third argument and it keys the result by another column too, so you get a lookup map with no loop at all.

#PHP #PHPDev #Laravel
August 11, 2026 at 1:17 PM
What's the slowest part of your dev loop right now? For me, it's static analysis on a big codebase. I've been testing a Rust-based tool that's 4x faster than PHPStan but covers fewer rules, and it's got me wondering how much coverage I'd give up for speed.

#PHP #PHPDev #DevTools
August 10, 2026 at 1:11 PM
I used to think shipping smaller PRs was just a process thing. Now I think it's a career skill. The engineers who grow fastest aren't the ones who make fewer bad assumptions; they just set things up so they find out they're wrong sooner.

#CareerDev #PHP #PHPDev
August 9, 2026 at 1:15 PM
Run `git diff --staged` before you commit. It's the same self-review habit as reading your own PR, just one step earlier, so you catch the stray var_dump before it's even in history.

#PHP #GitTips #PHPDev
August 4, 2026 at 1:16 PM
What's the first thing you check when you open your own PR before you assign a reviewer? Mine's always the diff, hunting for stray debug lines I forgot to pull out.

#CodeReview #PHP #PHPDev
August 3, 2026 at 1:08 PM
The gap between a senior dev and a junior one isn't years of experience. It's whether you catch your own mistakes before someone else has to point them out.

#CareerDev #PHP #PHPDev
August 2, 2026 at 1:08 PM
Quick poll: do you actually read through your own diff before you assign a reviewer, or does it go straight over the second it compiles?

https://scott.keck-warren.com/blog/2026/the-code-review-habit-that-makes-every-pr-better/

#CodeReview #PHP #PHPDev
August 1, 2026 at 1:11 PM