Damien Seguy (@[email protected])

4.8K posts

Damien Seguy (@dseguy@phpc.social)

Damien Seguy (@[email protected])

@faguo

Code quality fanatic, static analysis expert @exakat, elephpant breeder, husband, father, speaker!https://t.co/bXYI33RdlH

The Hague, The Netherlands Katılım Nisan 2007
978 Takip Edilen1.5K Takipçiler
Damien Seguy (@[email protected]) retweetledi
Alexandre Daubois
Alexandre Daubois@alexdaubois·
#PHP streams have a built-in notification system. Set a callback in the stream context. Get called on CONNECT, MIME_TYPE, FILE_SIZE, PROGRESS, COMPLETED. Download progress bars. In pure PHP. No curl_setopt. No ReactPHP. This callback has existed since PHP 5.2!
Alexandre Daubois tweet media
English
6
23
218
9.2K
Kyrian Obikwelu
Kyrian Obikwelu@CodeWithKyrian·
There's so much hidden and not-so-properly-documented features of PHP streams thus why they're heavily underutilized I just hope the work @ThePHPF planned on modernizing the streams subsystem will improve all of that (I'm rooting for having a more structured OOP interface on top it which is better for discoverability as Well)
Alexandre Daubois@alexdaubois

#PHP streams have a built-in notification system. Set a callback in the stream context. Get called on CONNECT, MIME_TYPE, FILE_SIZE, PROGRESS, COMPLETED. Download progress bars. In pure PHP. No curl_setopt. No ReactPHP. This callback has existed since PHP 5.2!

English
1
2
21
1.2K
Damien Seguy (@[email protected]) retweetledi
PHP Talks
PHP Talks@PhpTalks·
What’s the most confusing PHP concept you’ve encountered? Was it OOP, namespaces, or something else? Share your thoughts —let’s help each other grow #PHPTalks #WebDevelopment
PHP Talks tweet media
English
0
2
4
128
Damien Seguy (@[email protected]) retweetledi
Nic Wortel
Nic Wortel@nicwortel·
The PHP internals team has voted 38-4 to deprecate all OOP constructs in PHP 9.0. The reason: LLMs produce 34% fewer errors on procedural codebases. SOLID principles cause context overload in 78% of tested models. `__construct()` is the #1 source of LLM hallucinations in PHP. #laravel and #symfony are assessing the impact on their roadmaps. WordPress is already compatible. How are you preparing your codebase? #php #oop #ai #llm
Nic Wortel tweet media
English
86
76
796
138.6K
Damien Seguy (@dseguy@phpc.social)
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!
Damien Seguy (@dseguy@phpc.social) tweet media
English
0
1
5
136
Damien Seguy (@[email protected]) retweetledi
Kemo
Kemo@delalick·
phpsadness.com showed what was wrong with PHP. haPHPiness shows what's right. 67 features from PHP 5.4 → 8.5 that genuinely make developers happy. Code examples, version info, the works. haphpiness.com #PHP #phpc
Kemo tweet media
English
4
34
242
10.3K
Damien Seguy (@[email protected]) retweetledi
Camille Roux
Camille Roux@CamilleRoux·
1,65 million de vues par mois sur ma veille tech 🎉 14 000 likes, 2 000 commentaires, 17 000 bookmarks, 37 000 clics... en 30 jours ! J'ai codé un outil avec Claude Code pour automatiser la diffusion. La curation, elle, reste 100 % manuelle. Je raconte tout ici ↓
Français
6
9
69
8.8K
Alexandre Daubois
Alexandre Daubois@alexdaubois·
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! These two functions exist solely to save your math from IEEE 754.
Alexandre Daubois tweet media
English
2
4
33
1.4K
Damien Seguy (@dseguy@phpc.social)
@alexdaubois Sadly, they are also the least used #PHP functions, with 0 usage over 3300+ OSS projects (still half a million to go). And, of course, now that we mentioned it, wettriffs.com and internet rule 34 is going to kick in (although, it might be challenging): anyone? Shoot!
English
0
0
0
141
Tahir Iqbal Najam
Tahir Iqbal Najam@tahiriqbalnajam·
Composer used to mean PHP dependency manager. Now with Cursor pushing 'Composer 2', the naming overlap is confusing the PHP community. Words matter in tech—clarity > collisions #composer2 #php
English
1
0
1
124
Damien Seguy (@[email protected]) retweetledi
Alexandre Daubois
Alexandre Daubois@alexdaubois·
RegexIterator in #PHP doesn't just filter. It can REPLACE. MATCH mode: filter. GET_MATCH: capture groups. REPLACE: regex substitution on every element. preg_match + preg_replace + array_filter as a lazy iterator. Tempting, isn't it? Built-in regex pipeline!
Alexandre Daubois tweet media
English
0
8
90
2.5K
Human Coders
Human Coders@humancoders·
NaN en Python ne s'égale pas à lui-même, peut apparaître en 10 exemplaires dans un set, et servir de clé de dictionnaire... tout en étant inaccessible 🤔 ⬇️ news.humancoders.com/t/python/items…
Human Coders tweet media
Français
1
1
3
655
Damien Seguy (@[email protected]) retweetledi
Alexandre Daubois
Alexandre Daubois@alexdaubois·
Ever wondered what happens internally when you call strlen("hello") in #PHP? Before your C function even runs, PHP must validate and extract every argument you passed. This system is called ZPP (Zend Parameter Parsing) and it has a fascinating history. A thread. 🧵
Alexandre Daubois tweet mediaAlexandre Daubois tweet media
English
3
11
75
5.6K
Damien Seguy (@[email protected]) retweetledi
Alexandre Daubois
Alexandre Daubois@alexdaubois·
#PHP has a built-in ASCII tree renderer. In the SPL. RecursiveTreeIterator takes any recursive structure (arrays, directories, XML...) and outputs a formatted indented tree. `tree` command behavior. In PHP. Since 5.3. Pretty sure I would have use it a few times if I knew it existed 😅
Alexandre Daubois tweet media
English
5
18
188
7.5K