Damien Seguy
@dseguy.bsky.social
📤 640
📥 225
📝 279
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
25 days ago
0
7
0
reposted by
Damien Seguy
AFUP Bordeaux
about 2 months ago
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!
0
2
3
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.
about 1 month ago
1
1
0
reposted by
Damien Seguy
Eric L. Barnes
about 1 month ago
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.
loading . . .
0
6
5
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...
about 1 month ago
0
1
1
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...
about 2 months ago
1
3
0
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...
2 months ago
0
0
0
I ran into a 2011
#PHP
ASCII art generator, and the code works perfectly on PHP 8.5.
donatstudios.com/Damn-Simple-...
loading . . .
Damn Simple PHP ASCII ART Generator
https://donatstudios.com/Damn-Simple-PHP-ASCII-Art-Generator?ref=dailydev
2 months ago
0
1
0
#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...
2 months ago
0
1
0
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...
2 months ago
1
0
0
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...
2 months ago
0
0
0
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...
3 months ago
0
0
0
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...
3 months ago
0
1
0
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...
3 months ago
0
1
0
reposted by
Damien Seguy
Alexandre Daubois
5 months ago
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 🧵👇
1
10
4
The third way to cast a
#PHP
variable to integer is to use the + sign on it.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
loading . . .
Another Cast To Int
Another way to cast a value to int, besides the obvious ``(int)`` operator and the classic ``+ 0``, is to use the unary operator ``+`` operator on a variable: it add a sign operation on the variable, ...
https://php-tips.readthedocs.io/en/latest/tips/cast_to_int.html
4 months ago
0
0
0
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...
5 months ago
0
0
0
#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...
5 months ago
0
0
0
#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...
loading . . .
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``
https://php-tips.readthedocs.io/en/latest/tips/mixed_is_not_no_type.html
5 months ago
0
0
0
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...
5 months ago
0
0
0
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...
5 months ago
0
1
0
Since
#PHP
8.4, we can have properties in interfaces! Thank you, property hooks!
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
6 months ago
2
3
0
reposted by
Damien Seguy
AFUP
6 months ago
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.
loading . . .
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?
https://haphpy-birthday.net
1
1
1
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...
6 months ago
0
0
0
#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.
6 months ago
1
7
1
reposted by
Damien Seguy
Ian Littman
6 months ago
I haven't set up a @longhornphp.com account yet here, but Longhorn PHP is back for its sixth (!) year this October. As usual, we're at Holiday Inn Austin Midtown Thursday-Saturday; dates for this year are October 23-25. CFP is open; submit talks at
cfp.longhornphp.com
. See y'all there?
loading . . .
Longhorn PHP Conference CFP
Call for Presenters for Longhorn PHP Conference
https://cfp.longhornphp.com
0
7
5
#PHP
methods must be compatible with the one in the parent. Except __construct, which may be different. And except abstract __construct.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
loading . . .
Signature Compatibility Exception
All methods must be compatible with their parent's signature: the types, reference options, variadic and number must be compatible (although, not equal)
https://php-tips.readthedocs.io/en/latest/tips/constructor_consistency.html
6 months ago
0
0
0
Who remember this?
#PHP
nostalgia
6 months ago
2
8
1
#PHP
recursive methods are easy, because they have a name. What about closures? arrow functions?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
6 months ago
0
2
0
reposted by
Damien Seguy
Bearstech
6 months ago
phptop : une Profileur de ressources de base PHP (CPU/mémoire), Open Source, sécurisé et utile pour les sites de production 👉
github.com/bearstech...
1
12
4
#PHP
can type arguments, properties and returns. But can it type also local variables ? Well, it could, and for a long time.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
6 months ago
0
0
0
30 years of PHP and inaugural meetup Thu, Jun 12th, 2025, 6:30 PM PHP meetups are back in Rotterdam with our inaugural meetup for RotterdamPHP!!1 (very original, we know) And our first meetup is a real treat: celebrating 30 years of
#PHP
www.meetup.com/rotterdamphp...
loading . . .
30 years of PHP (inaugural meetup), Thu, Jun 12, 2025, 6:30 PM | Meetup
PHP meetups are back in Rotterdam with our inaugural meetup for RotterdamPHP!!1 (very original, we know) And our first meetup is a real treat: celebrating 30 years of PHP
https://www.meetup.com/rotterdamphp/events/308104341/
6 months ago
0
0
0
C est toujours mon village préféré
6 months ago
1
1
0
When using a referenced argument, the type is checked but it is not garanteed. After execution, it might be different than initialy. Rare, but surprising.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
6 months ago
0
2
1
reposted by
Damien Seguy
AFUP
6 months ago
L'appel à conférences pour le Forum PHP 2025 est ouvert jusqu'au lundi 16 juin, 23h59. Soumettez vos sujets de conférences : quel que soit la thématique, nous avons hâte d'en prendre connaissance. Nous visons un programme varié, pour tous les niveaux, les 9 et 10 octobre. À vous !
cfp.afup.org
0
2
2
<=>
#PHP
spaceship operator may be conveniently chained together to make a multisort() tool.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
loading . . .
Chaining Spaceship
It is possible to chain several spaceship operations by using the coalesce operator ``
https://php-tips.readthedocs.io/en/latest/tips/chaining_spaceship.html
7 months ago
0
2
0
reposted by
Damien Seguy
Punyapal Shah ⚡ Laravel Artisan
7 months ago
Happy Mother's Day to PHP, the Mother of the Web! 💙
0
5
1
7 months ago
1
2
0
Sometimes, you'll find underscores in your HTTP variables, where you expected other characters, like +, . or space. parse_str(), the underlying
#PHP
function, still enforce backward compatible behaviors.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
7 months ago
1
0
0
The (array) cast is very agile to convert any kind of value to an array, including objects. The only one that resists is
#PHP's
closure. This one only wants to end in another array.
#phptrick
#phptip
php-tips.readthedocs.io/en/latest/ti...
7 months ago
1
0
0
#PHP
list() command does not check much of the right side, so string and booleans are silently turned into null values. Also, it would be nice to support ellipsis with generators and list().
#PHP
9 may be?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
7 months ago
0
0
0
Did you know that
#PHP
has a triple plus operator ?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
loading . . .
Triple Plus Operator
This is a white space trick, where the expression allows for ``++`` and ``+`` to follow each other
https://php-tips.readthedocs.io/en/latest/tips/triple_plus_operator.html
7 months ago
0
0
0
reposted by
Damien Seguy
Frédéric Bouchery
7 months ago
@deuchnord.fr
was worried about not getting my quizzes anymore, so here's one for you. What will
#PHP
display with this code?
6
5
2
#PHP
magic constants __METHOD__ and __FUNCTION__ work both in methods and functions. And with some minor changes in their respective behavior.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
7 months ago
0
0
0
#phptip
#phptrick
add a skeleton here at some point
7 months ago
0
0
0
A Quine is a piece of code that executes to ... produce its own code. Could you do it in
#PHP
? There are probably more than one way...
php-tips.readthedocs.io/en/latest/ti...
#phptip
#phptrick
7 months ago
0
1
0
#PHP's
self is a type that refers to the current class, to use with the class's methods. It is also possible to use it on exported closures.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
7 months ago
1
1
0
Fatal error : Undefined constant A on line 9. Well,
#PHP
, I'm still defining it so give me a second, will you?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
loading . . .
Undefined Constant A On Its Line Of Definition
This piece of code returns a puzzling error: 'Undefined constant A', on the line 9
https://php-tips.readthedocs.io/en/latest/tips/no_const_A.html
8 months ago
0
0
0
http_build_query() is able to convert enum cases directly into URL query variables in
#PHP
8.4. This is an example of agile usage of backed enumeration. An inspiration for the future, that will promote enumeration further?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
8 months ago
0
4
0
#PHP
prevents making a reference on a readonly property, to avoid sneaky updates. It also prevents assigning a reference to a readonly property. All with the same error message.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
8 months ago
0
1
0
Load more
feeds!
log in