Damien Seguy
@dseguy.bsky.social
📤 661
📥 246
📝 327
Code quality fanatic, static analysis expert @exakat, elephpant breeder, husband, father, speaker!
reposted by
Damien Seguy
Micha the DevOp
3 days ago
🗂️ Use
#GoogleSheets
as a
#Laravel
database! laravel-google-sheets-database-driver maps spreadsheet = DB, tab = table, row 1 = columns. Full
#Eloquent
& Query Builder support.
#PHP
#opensource
github.com/AmazingBV/l...
0
4
1
A few edge cases for integers, floats and divisions with
#PHP
#phptips
#phptricks
php-tips.readthedocs.io/en/latest/ti...
loading . . .
Of Integers And Floats
First thing to unpack in this post: PHP accepts any number of decimals when it is hardcoded in the source
https://php-tips.readthedocs.io/en/latest/tips/int_and_float.html
3 days ago
0
2
0
reposted by
Damien Seguy
Alexandre Daubois
4 days ago
$GLOBALS used to introduce aliasing complexity in the engine. Because it could reference local variables, Zend had to handle indirect entries (IS_INDIRECT) in certain array access paths.
#PHP
8.1 restricted $GLOBALS writes, removing that edge case and simplifying hot paths.
0
2
1
Review of the various usage of the empty string in
#PHP
This is not a modern feature, by no measure, but a versatile piece of data that leads to paradoxical usages.
#phptip
#phptrick
www.exakat.io/the-empty-st...
loading . . .
The Empty String in PHP: One Value, Too Many Jobs - Exakat
The Empty String in PHP: One Value, Too Many Jobs. It is used as default value, value upon success or error, accumulator and cast operator
https://www.exakat.io/the-empty-string-in-php-one-value-too-many-jobs/
4 days ago
0
0
0
reposted by
Damien Seguy
Seifeddine / ⵙⵢⴼ 🐘 🦀
7 days ago
🐘 Mago 1.29.0 is out! ✨ Readable closure & anon-class names ✨ Regex-pattern issue ignores ✨ WordPress security rules 🐛 Generic template inference fixes
github.com/carthage-sof...
#php
#mago
loading . . .
Release Mago 1.29.0 · carthage-software/mago
Mago 1.29.0 A maintenance release with two themes: tightening generic template inference (the #1859 false-positive cluster) and giving closures + anonymous classes stable, human-readable names. New...
https://github.com/carthage-software/mago/releases/tag/1.29.0
0
3
1
reposted by
Damien Seguy
AFUP
8 days ago
La journée de conférences continue à Bordeaux, Lille, Lyon et Paris. Partout, le même écho : des conférences intéressantes, un public bienveillant et des équipes d'orga dévouées. Merci et bonne après-midi à toutes et tous !
0
3
1
Toujours prendre ses elephpants à l
#afupday
@afup.org
8 days ago
0
0
0
reposted by
Damien Seguy
Fabien Potencier
11 days ago
During the last few weeks, the
#Symfony
core team has been hard at work fixing a long list of vulnerabilities for both
#Symfony
and
#Twig
. Today, we're publishing that work in the biggest security patch releases ever. Bare with us and wish us luck 🍀
2
28
18
Passing array by value, and updating its elements. Nothing new, it is the readonly and array_fill() syndrom for arrays. Better know about it.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
29 days ago
0
0
0
reposted by
Damien Seguy
#PHP
quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value? And more than one of us has this bug ATM.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
about 2 months ago
0
1
1
#PHP
quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value? And more than one of us has this bug ATM.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
about 2 months ago
0
1
1
reposted by
Damien Seguy
GromNaN
about 2 months ago
I always thought that the order of properties in a
#PHP
class didn't matter, but that's not true. It does matter when comparing two instances of the same class. Each property is evaluated one after another in the order they were declared until the first difference is found.
3v4l.org/NTP5c
1
6
2
#PHP
news:
lemmy.world/c/php?dataTy...
loading . . .
PHP - Lemmy.World
<? namespace lemmy\php; /* Welcome to the PHP community on Lemmy #Rules: 1: Soon™ #Helpful stuff: PHP Documentation [https://www.php.net/docs.php] Composer [https://getcomposer.org/doc/00-intro.md] PHP Standards [https://www.php-fig.org/psr/] #Common frameworks: Symfony [https://symfony.com/doc/current/getting_started/index.html] Larvel [https://laravel.com/docs/] */ echo “Welcome”;
https://lemmy.world/c/php?dataType=Post&sort=New
about 2 months ago
0
0
0
#phptip
#phptrick
add a skeleton here at some point
about 2 months ago
0
0
0
reposted by
Damien Seguy
Alexandre Daubois
about 2 months ago
header_register_callback() registers a function that fires just before headers are sent. After ALL your code runs. After ALL output buffering. Before the first byte goes to the client. Last chance to add headers, and last chance to change the status code! There is no later hook in
#PHP
than this.
0
4
1
reposted by
Damien Seguy
Human Coders News
about 2 months ago
Terminal Trove – Le catalogue incontournable des outils en ligne de commande
loading . . .
Terminal Trove - The $HOME of all things in the terminal.
Terminal Trove showcases the best of the terminal, Discover a collection of CLI, TUI, and more developer tools at Terminal Trove.
https://terminaltrove.com/
0
3
1
reposted by
Damien Seguy
Nigel James
about 2 months ago
All
#PHP
developers should watch this talk by
@dseguy.bsky.social
to prepare their codebases for the future
youtu.be/T5wQn57Zhkw?...
loading . . .
Prepare for PHP 9: A tour of all PHP 8 Deprecations by Damien Seguy
YouTube video by Dutch PHP Conference
https://youtu.be/T5wQn57Zhkw?feature=shared
0
4
2
reposted by
Damien Seguy
Human Coders
about 2 months ago
Gagne ta place pour l'@afup.org Day 2026 ! 🥳 L'événement a lieu à Bordeaux, Lyon et Lille, vendredi 22 mai ! Pour jouer : - Rejoins notre Discord :
humancoders.com/pages/discord
- Précise la ville pour laquelle tu participes - Les gagnant·e·s seront annoncé·e·s sur Discord le 24 avril
1
5
5
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.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
about 2 months ago
0
0
0
I’m always moved when a young elePHPant meets Trisaieul, the great grand parent of all elephpants. Thanks Tideways for making this reunion possible. Moni: welcome to the PHPamily!
2 months ago
0
0
0
#PHP
defined() in action: there are many aspects when checking for a constant existence.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
2 months ago
0
0
0
reposted by
Damien Seguy
The PHP Foundation
2 months ago
We are very happy to welcome Matt Stauffer as the newest Board member for The PHP Foundation! Matt brings decades of experience and we are grateful for his insight as we move forward. Welcome, Matt! 🤩 🐘 🚀 Read more:
thephp.foundation/blog/2026/03...
#php
#thephpfoundation
#phpc
loading . . .
Welcoming Matt Stauffer to The PHP Foundation Board
The PHP Foundation — Supporting, Advancing, and Developing the PHP Language
https://thephp.foundation/blog/2026/03/25/welcoming-matt-stauffer-to-the-php-foundation-board/
0
25
9
3 strategies to rename parameters in a
#PHP
method
www.exakat.io/renaming-par...
loading . . .
Renaming Parameters in a method - Exakat
Renaming Parameters in a method is a classic challenge in PHP code: with PHP 8.0 named parameter, new strategies are need to refactor it.
https://www.exakat.io/renaming-parameters-in-a-method/
2 months ago
0
1
0
reposted by
Damien Seguy
Alexandre Daubois
2 months ago
I owe this one to @faguo! In
#PHP
, expm1() computes exp(x) - 1. log1p() computes log(1 + x). "Why not just write exp($x) - 1" you may ask... Because when x is close to 0, floating point eats your precision alive. Think about it if you deal with finance!
0
4
3
reposted by
Damien Seguy
Derick Rethans
2 months ago
I've published a new blog post: "Human Creations", on the difference in content generation by LLMs, and the creation of text, art and code by humans. You can find it at https://derickrethans.nl/human-creations.html or at
@blog
#writing
#ai
#content
#fediverse
#madebyhumans
loading . . .
Human Creations — Derick Rethans
https://derickrethans.nl/human-creations.html
0
6
7
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!
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
2 months ago
0
0
0
Current
#PHP
RFCs in voting phases (March 2026) See what will come to
#PHP
8.6
www.exakat.io/current-php-...
loading . . .
Current PHP RFCs in Voting Phase (March 2026) - Exakat
Current PHP RFCs in Voting Phase: PHP licence, BC breaks with types policy, DocComments, enum for sorting, fetching array keys.
https://www.exakat.io/current-php-rfcs-in-voting-phase-march-2026/?ref=dailydev
2 months ago
0
0
0
#[ReturnTypeWillChange
] works on native
#PHP
methods and also on custom ones.
#phptrick
#phptip
php-tips.readthedocs.io/en/latest/ti...
loading . . .
ReturnTypeWillChange Is For All
``ReturnTypeWillChange`` is an attribute that tells PHP that the return type of the related method is different from the defined by the PHP native methods
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
2 months ago
0
0
0
#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.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
2 months ago
0
0
0
reposted by
Damien Seguy
Punyapal Shah
3 months ago
What kind of PHP developer are you? 🤔
2
4
1
A ::parent operator in
#php
?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
loading . . .
::parent Operator
PHP provides the ``X::class`` operator to access a class's fully qualified name
https://php-tips.readthedocs.io/en/latest/tips/parent_operator.html
3 months ago
0
0
0
#PHP
, Protecteurs de Hautes Personnalités, carrément sur le site du ministère de l'intérieur.
www.gendarmerie.interieur.gouv.fr/gendinfo/dos...
loading . . .
Les PHP, protecteurs de hautes personnalités
Pour répondre à des sollicitations de plus en plus nombreuses, la FSP (Force Sécurité Protection du GIGN) peut compter sur les PHP (Protection de Haute Personnalité)...
https://www.gendarmerie.interieur.gouv.fr/gendinfo/dossiers/gign-3.0/les-php-protecteurs-de-hautes-personnalites
3 months ago
0
3
0
OK, I'm tired and this
#PHP
make me chuckle.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
3 months ago
0
2
0
Can you make this
#PHP
riddle running? This compiles, so you can only add more code to make it work. I asked 5 AI, 2 succeeded, 3 failed.
#phptip
#phptrick
3 months ago
1
0
0
So,
#PHP
typed class constants are vaguely useful? Here is a nice usage case that will definitely makes everyone love them.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
3 months ago
0
0
0
#PHP
numeric separator works well on integer, floats and also hexadecimals, octals and ... binary. And most useful in the latter, right? 0b1111_00_111_101_111
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
3 months ago
0
0
0
Recap of a journey to refactor strings to
#PHP
enumerations, and some of the met challenges.
www.exakat.io/refactoring-...
loading . . .
Refactoring Strings to Enums - Exakat
A journey to achieve Refactoring Strings to Enums: pre-requisite, unexpected consequences, and general recommendations.
https://www.exakat.io/refactoring-strings-to-enums/
3 months ago
0
1
0
What do you think this
#PHP
code will write? Could we do better ?
#phptip
#phptrick
cc
@lecodeestdanslepre.fr
😉
php-tips.readthedocs.io/en/latest/ti...
4 months ago
1
2
1
reposted by
Damien Seguy
Bearstech
4 months ago
L'EU Open Source Policy Summit 2026 se tiendra le 30 janvier à Bruxelles et en ligne pour échanger sur le rôle de l’Open Source dans la résilience numérique et la compétitivité européenne. 👉
data.europa.eu/en/ne...
0
4
4
What if you want to convert a
#PHP
string to the opposite number ? Can you cast (int) and use minus? Well, can you?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
4 months ago
1
3
0
So, ...[4] means unpacking a single value from a
#PHP
array. This basically means reading the value itself. Unless it is useful sometimes...
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
4 months ago
0
1
0
Closure, constant,
#PHP
8.5, parenthesis, ants and cast: what could go wrong, right?
php-tips.readthedocs.io/en/latest/ti...
#phptip
#phptrick
4 months ago
0
1
0
TIL that it is possible to use cast, like (int) or (string) with constants, since
#PHP
8.5.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
4 months ago
0
0
0
Je serai de passage à l'
@afup.org
Limoges, jeudi 29 janvier 2026. Rendez-vous chez OD&B, pour améliorer son code aujourd'hui et être prêt pour
#PHP9
demain! Les elePHPants sont les bienvenus!
www.meetup.com/afup-limoges...
loading . . .
Meetup Janvier - Damien Seguy, Thu, Jan 29, 2026, 6:30 PM | Meetup
Bonjour à tous ! Non vous ne rêvez pas ! Un événement tech aura bien lieu à Limoges ! C'est du last minutes mais nous profitons de la venue de Damien Seguy dans nos contr
https://www.meetup.com/afup-limoges-php/events/312898152/
4 months ago
0
0
0
The global keyword imports variables from the outside, and overwrites the local value. Beware, when using it.
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
5 months ago
1
0
0
reposted by
Damien Seguy
Alexandre Daubois
5 months ago
I just started the vote on my latest
#PHP
RFC to improve pack() and unpack() functions. It targets the next version, likely 8.6 as I'm writing this. Fingers crossed! 🤞
wiki.php.net/rfc/pack-unp...
1
4
1
ElePHPant alert : Le Monstre, from
#frankenphp
is available on the shop. Normal or big.
lemonstre.frankenphp.dev
5 months ago
1
0
0
Converting a string to an int, without a warning. A PHP 8.5 challenge.
#phptip
#phptrick
www.exakat.io/convert-a-st...
loading . . .
Convert a string to integer with PHP - Exakat
How to Convert a string to integer with PHP: since PHP 8.5, there is a warning for larger than integer strings, so how do you do it?
https://www.exakat.io/convert-a-string-to-integer/
5 months ago
0
1
0
reposted by
Damien Seguy
AFUP
5 months ago
Devs de Lille et des environs, rejoignez la communauté ce soir au Bar Hôpi pour un dernier verre avec l'AFUP Hauts-de-France avant la nouvelle année ! Il est encore temps de vous inscrire pour une soirée en bonne compagnie.
buff.ly/L7yJmWw
0
1
1
Can a
#PHP
class have two methods with the same name? Not with signature overloading, a classic feature, right? But rather one method static and the other one non-static?
#phptip
#phptrick
php-tips.readthedocs.io/en/latest/ti...
6 months ago
0
1
0
Load more
feeds!
log in