#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...
#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...
What is the expected impact? 10% speed up of implode() calls?
<?php const from = ['yield from']; $a = fn () => yield yield from from; foreach($a() as $b) { print $b; }
OK, I'm tired and this #PHP make me chuckle.
#phptip #phptrick
php-tips.readthedocs.io/en/latest/ti...
😂 good inspiration ideas …
Any 3v4l.org link to share?
<?php class X { private array $code = []; function foo() { return (string) $this<-code; } } var_dump((new X)->foo());
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
<?php class x { const int|string A = 1, B = 'abc'; } echo strlen(X::B);
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...
#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...
Recap of a journey to refactor strings to #PHP enumerations, and some of the met challenges.
www.exakat.io/refactoring-...
<?php echo 'B', 'A', sqrt(-1), 'A'; ?>
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...
En #PHP, ca marche aussi, mais en majuscules, et je dois reconnaitre que c'est moins élégant.
Now, we need more details. What, where, how?
Blog post?
Illustration de l'article
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...
<?php $string = '123a'; $integer = -$string; // warning!
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...
<?php function foo() { print_r(func_get_args()); } $array = [1,2,3]; // Not possible // cannot use positional argument after unpacking //foo(...$array, ...$array, 4); foo(...$array, ...$array, ...[4]);
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...
Closure, constant, #PHP 8.5, parenthesis, ants and cast: what could go wrong, right?
php-tips.readthedocs.io/en/latest/ti...
#phptip #phptrick
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...
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...
Are telling everyone that I am more than 100 years old? Ssshhhhh!
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...
Thanks for your work!
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...
ElePHPant alert : Le Monstre, from #frankenphp is available on the shop. Normal or big.
lemonstre.frankenphp.dev
Converting a string to an int, without a warning.
A PHP 8.5 challenge.
#phptip #phptrick
www.exakat.io/convert-a-st...
Apéro PHP mercredi 17 décembre dès 18h chez Hopi
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
<?php class X { // Some magic happen here } X::foo(); (new x)->foo();
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...
C'est le deuxième jour de @osxp2023.bsky.social et on parle de tout #php #drupal #firefox #commonvoire... et vous me trouverez sur le stand @drupal.fr @mozilla-fr.bsky.social au village associatif
<?php echo intval('1AZ') .PHP_EOL; // 1 echo intval('1AZ', 11).PHP_EOL; // 21 echo intval('1AZ', 21).PHP_EOL; // 31 echo intval('1AZ', 36).PHP_EOL; // 1691 echo intval('1AZ', 37).PHP_EOL; // 0 echo intval( 123, 11).PHP_EOL; // 123 echo intval('123', 11).PHP_EOL; // 246
Do you think that intval() is a boring #PHP native function that turns string into integers?
Well, it does, but it is not boring. Far from it!
php-tips.readthedocs.io/en/latest/ti...
#phptip #phptrick
Interesting #PHP news and articles on @dailydev.bsky.social : the PHPDev squad.
See you there!
app.daily.dev/squads/phpdev