mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.6K
active users

#php

138 posts109 participants5 posts today
Replied to Derek Martin

@lo_fye The syntax currently used in PHP was borrowed from Rust, but it was not the original syntax adopted. We went through multiple RFCs and votes before arriving at the current syntax. It was not an easy decision. These are the four RFCs (all accepted) that led to the current syntax. As you can see, it was very contentious.

- wiki.php.net/rfc/attributes_v2
- wiki.php.net/rfc/attribute_ame
- wiki.php.net/rfc/shorter_attri
- wiki.php.net/rfc/shorter_attri

wiki.php.netPHP: rfc:attributes_v2

I know I’m late to this game but does anyone else strongly dislike the syntax & aesthetics of #[\Attributes] in #php ? To me they feel like something distinctly unphp-ish that was glued onto php. I like how they work, I just wish they matched the language better.

Dear #lazyweb; Does anyone remember when #php added the mysql:localhost == mysql:/tmp/mysql.sock "optimization"? I know it's freaking ANCIENT, but I can't quite be bothered to track it down.

Also, was this because MySQL used to do it and PHP wanted to preserve that for BC reasons after MySQL removed the "helpful" behavior?

Me: Why is Doctrine (a PHP ORM) not hydrating my embedded class property? It's marked as embeddable and there are no nullable properties (something which does cause hydration to silently fail apparently). WHY CAN'T I GET THIS TO WORK?!

[a few hours later]

Me: Actually, I can take a different approach and avoid Doctrine embeddables entirely. \o/

Validation is one of my favorite Laravel features. In today's video, I walk through an example where I put a little extra effort into customizing the error message, and why I think it's useful in this situation. #php #laravel masteringlaravel.io/daily/2025

Mastering LaravelHow can we make error messages more useful to the user? | Mastering LaravelAnd when it's worth the effort

What if your PHP functions could pause, resume, and remember where they left off, like little self-aware scripts? ⏯️

That’s what coroutines are for, and PHP gives you two tools to use them: Generators (since 5.5) and Fibers (in PHP 8.1).

🥔 🔥 I break it all down with real code, plus a hot potato metaphor you won’t forget:
doeken.org/blog/coroutines-in-

doeken.org · Exploring Coroutines in PHPCoroutines are functions that pause and resume with state, allowing flexible, bidirectional control flow in PHP.