Damien Seguy
banner
dseguy.bsky.social
Damien Seguy
@dseguy.bsky.social
Code quality fanatic, static analysis expert @exakat, elephpant breeder, husband, father, speaker!
November 20th, 2025: PHP 8.5 arrives! 🐘

We’re throwing a release party at PHP Rotterdam, and you’re invited!

Expect PHPun, knowledge-sharing, and great company at Last Mile Solutions!

eventy.io/events/q8lmw...

#PHP #PHP85 #Community #Rotterdam #Developers
November 6, 2025 at 6:05 AM
Reposted by Damien Seguy
Cette année votre antenne préférée (nous 🤫) vous propose un AFUP Day à Bordeaux !

What's next?
Les CFPs sont ouverts jusqu'au 10 Novembre 2025 par ici 👉 event.afup.org
Et la billetterie est ouverte aussi par ici 👉 event.afup.org
⚠ Les tarifs "les yeux fermés" sont limités

See you there!
October 13, 2025 at 3:33 PM
I can get phpstan elephpants at #IPC Munich. Do you want one too?
Send me a DM to book one (30 e, delivery by CPS)
Deadline : Wednesday 29th October.
October 28, 2025 at 5:09 PM
Reposted by Damien Seguy
I had the opportunity to chat with @asgrim.dev yesterday about PHP Pie - the new installer for PHP extensions, intended to replace PECL.

Full interview dropping tomorrow.
October 22, 2025 at 2:06 PM
It is easy to create a map from a list of object, using #PHP array_column() and the second argument null.

That null represents the whole object, and the third argument is the indexing key.

array_column($list_of_objects, null, 'id');

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
October 22, 2025 at 12:47 PM
It is not possible to cast any #PHP enum cases to (string) or (int) even when... they are backed!

That looks like a natural feature, though.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
October 2, 2025 at 8:28 PM
Dynamic class constants is achieved with #PHP 8.3 class constant syntax, and the constant() function.

It also applies to enumeration cases.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
October 1, 2025 at 8:52 PM
I ran into a 2011 #PHP ASCII art generator, and the code works perfectly on PHP 8.5.

donatstudios.com/Damn-Simple-...
Damn Simple PHP ASCII ART Generator
donatstudios.com
September 26, 2025 at 7:07 PM
#PHP callable arrays are checked for 2 elements and only using index 0 and 1.

No one said that 0 and 1 have to be in that order, and it works perfectly!

Well done #PHP, well done!

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
September 21, 2025 at 5:06 PM
There are, at least, 4 ways to create a closure in #PHP. They all will be callable later.

On the other hand, they behave differently to check the underlying method.

All is in the timing.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
September 19, 2025 at 7:16 PM
A few days ago, I warned about isset() and a possible #PHP Fatal error.

Given that isset() and ?? share the same code, it is not suprising that ?? hold the same trap.

That bug should go away, the sooner the beter.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
September 18, 2025 at 8:16 PM
When using #PHP isset(), the language construct hides errors because, that's what is being tested there.

Unless there is an object, where an array is expected. Then, it leads to a fatal error.

It prevents the usage of an optimisation.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
September 15, 2025 at 6:50 PM
It is Friday, so why not cram as many #PHP operators in one single operation, and make it work?

Look at this beauty! Could you make it run?

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
September 5, 2025 at 8:23 PM
A rare find: A syntax that worked before #PHP 8.1 and after #PHP 8.2 but not in #PHP 8.1

Here is the never arrow function.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
August 27, 2025 at 3:33 PM
Reposted by Damien Seguy
You enjoyed the thread about "unadvertised" features of the upcoming #PHP 8.5 release? 🤩

Let's do it again with the latest released version, PHP 8.4, for all #Symfony/#Laravel/vanilla PHP fans 🚀

Here are 11 FEATURES you probably don't know about the current PHP version 🧵👇
July 18, 2025 at 7:44 AM
So, take a #PHP array, but some value in it (like, anything).

Can you make an infinite loop out of this?

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
July 3, 2025 at 6:12 PM
#PHP properties may be a reference.
#PHP properties may be promoted.
#PHP properties may have a hook.

Just not both at the same time.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
June 29, 2025 at 10:35 AM
#PHP mixed type accepts any type, just like no type. But it is also making property unreadable before initialisation.

And that's often a useful check.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
mixed Is Not No Type
When a property is not typed, nor has a default value, it still may be accessed freely: its value is ``null``
php-tips.readthedocs.io
June 27, 2025 at 2:30 PM
In #PHP array_merge_recursive(), what is recursive?

Does it go deep in the guts of the arrays, or does it merges values that look alike?

Or something else?

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
June 25, 2025 at 8:36 PM
Did you know that #PHP 's own $GLOBALS variable is actually undefined?

I'm going to miss the hedonism of those error messages once they are all fixed.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
June 22, 2025 at 7:40 PM
Since #PHP 8.4, we can have properties in interfaces!

Thank you, property hooks!

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
June 18, 2025 at 5:43 PM
Reposted by Damien Seguy
Communuautés de devs du monde entier, célébrons les 30 ans de PHP en nous fédérant autour du site haphpy-birthday.net ! Avant de participer à la vidéo collaborative, ajoutez votre logo sur le site, et faites passer le mot.
PHP is 30! Happy Birthday!
Oh my… Time flies! Do you remember when the community was celebrating the 20th birthday of PHP? Do you remember the tribute movie made by PHP users and groups to praise it?
haphpy-birthday.net
June 18, 2025 at 7:02 AM
The humble bitwise operators (& ^ | ) have a hidden secret : they work on integers and also on strings.

But not on both at the same time.

One of the earliest #PHP feature, still available 30 years later.

#phptip #phptrick

php-tips.readthedocs.io/en/latest/ti...
June 16, 2025 at 7:55 PM
#PHP and Rotterdam is a love story. A huge crowd of PHP aficionados congregated to treehouse, to listen to Gina and eat cake. 
 
Home is where the elePHPant is.
June 13, 2025 at 7:22 PM