dseguy
Static code analysis maestro @Exakat@phpc.social #PHP expert elePHPant breeder. https://linktr.ee/exakat
Would it be cool to have a #PHP ::parent operator, like we have the ::class operator
Well, turns out we can.
https://php-tips.readthedocs.io/en/latest/tips/parent_operator.html
preg_split() splits #PHP strings with regexes, captures the separators and can handle an empty regex.
You don't need that everyday, but when you do, #PHP has it!
https://php-tips.readthedocs.io/en/latest/tips/preg_split.html
#PHP's NAN is 0 as an integer, 'NAN' as a string and not comparable with itself.
Also, there are now warning when using them, so no one can get hurt by this.
https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html
Enumerations are backed by strings, they work with in_array(), but not with array_unique()
Well, at least, not directly.
Also, did you know Enum::cases() ?
https://php-tips.readthedocs.io/en/latest/tips/array_unique_and_enum.html
Quite a nice take on the current situation.
https://blog.lmorchard.com/2026/03/11/grief-and-the-ai-split/
New word: zombie closure
That is when you put $this in a static closure, you can run the #PHP code but you can't call it.
Just a reminder about static arrow functions.
https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html
#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
@davewoodx@mastodon.social @GeekAndDad@mastodon.social
What a toot packed full of surprises!
- OTAgo is a distribution system for iOS and Android App! I never knew it was possible to do that outstide Apple.
- "PHP is dead simple to use" is a great come back to the other meme. (Not the actual quote, but I read too fast)
- #PHP delivers (personal mandatory quote)
You made my day!
