Alexandre Daubois
@alexdaubois.bsky.social
📤 318
📥 62
📝 248
cto
@les-tilleuls.coop
/ @symfony.com+#frankenphp+
#php
core team • creator of ember
Ember isn't just a TUI for Caddy/#PHP apps: • ember status: one-line health check, exit code 0 if OK • ember --json --once: JSON snapshot for CI pipelines • ember --daemon --expose :9191: headless sidecar that serves
#Prometheus
metrics • ember diff before.json after.json: compare across deploys
about 6 hours ago
0
0
0
#PHP's
VM has 3 dispatch modes you can choose. CALL: each handler is a C function. The VM calls them one by one. SWITCH: one giant switch(opcode) in a loop. Classic interpreter. GOTO: computed goto. Each handler jumps directly to the next. Default is HYBRID: goto for hot paths, call for the rest.
1 day ago
0
0
0
The Zend VM of
#PHP
doesn't have one ADD handler. It has DOZENS. ZEND_ADD_LONG_NO_OVERFLOW, ZEND_ADD_DOUBLE... At compile time, the engine picks the most specific handler for your operand types. $a + $b with two known integers is a direct C addition. Thousands of specialized handlers.
2 days ago
0
0
0
#PHP's
foreach doesn't copy your array... Well, not anymore 😄 In PHP 7+, foreach creates an internal iterator (HashPosition) on the array. It walks arData linearly. Copy-on-write protects you: if you modify the array inside the loop, THEN it copies. No modification? No copy, zero overhead.
3 days ago
0
2
0
~15 MB RSS, ~0.3ms per poll cycle. The Docker image is a scratch-based binary + CA certs. No runtime dependencies. Zero config, read-only by design, and officially recommended by
#FrankenPHP
for all
#PHP
apps, also useful for Caddy-based apps. What are you waiting for? 🔥
4 days ago
0
0
0
reposted by
Alexandre Daubois
Les-Tilleuls.coop
5 days ago
Big updates for the FrankenPHP ecosystem: Ember 1.2 & 1.3 are out! The Caddy monitor is now a full-fledged observability platform. Details by
@alexdaubois.bsky.social
⬇️
les-tilleuls.coop/en/blog/embe...
loading . . .
Ember 1.2 / 1.3: Logs, Plugins, and a Platform That Grows With You | Les-Tilleuls.coop
Discover the latest features of Ember 1.2 and 1.3, which will make your observability stack even better!
https://les-tilleuls.coop/en/blog/ember-1-2-1-3-features-highlights
0
1
1
Ember 1.3 is out! 🔥🐘 I wrote a blog post about the new features of 1.2 & 1.3: plugin system, access and runtime logs live visualisation, upstreams health, Docker Hub... a lot to discover! Everything you need to know 👉
les-tilleuls.coop/en/blog/embe...
5 days ago
0
2
1
#PHP
8.4 lazy objects use the SAME engine fallback as __get/__set. When a property is accessed on a lazy object, the engine sees it's "uninitialized." This triggers the property fallback path: the same one used for magic methods! But instead of calling __get(), it calls your initializer once. 🧵
6 days ago
1
4
0
When you write `new MyClass()`,
#PHP
doesn't scan your filesystem. It checks a hash table of loaded classes. Not found? It walks a linked list of registered autoloader callbacks. First one that defines the class wins, others are skipped. That's the autoloading mechanism: hash miss + callback list.
7 days ago
1
2
0
If you're running your
#PHP
app using FrankenPHP, Ember detects it and adds a dedicated tab with per-thread introspection: state (busy/idle/inactive), current URI, request duration, memory usage with delta tracking, and a sparkline history. You can even restart a worker directly from the TUI.
8 days ago
0
1
1
Since
#PHP
8.0, OPcache has a JIT compiler. It turns Zend VM opcodes into native x86-64 machine code. Not all code. Just the hot paths, loops, arithmetic, function calls that run thousands of times. Tracing JIT watches which opcodes execute most, then compiles just those to native instructions.
9 days ago
0
0
0
Calling a function in
#PHP
isn't just a jump. The engine does this: 1. Check if the function is a known compile-time symbol 2. If not, look up the lowercase name in the function table (HashTable) 3. Push a new call frame on the VM stack 4. Copy/bind arguments into the frame 🧵
10 days ago
1
0
0
reposted by
Alexandre Daubois
AFUP
11 days ago
Dans l'interview du jour,
@alexdaubois.bsky.social
nous parle de JSON Path : un composant léger, RFC compliant, qui peut transformervos tests d’API… et même la façon de concevoir vos endpoints. Découvrez-en plus sur le sujet avant son talk le 22 mai à Lyon : prenez vos places !
buff.ly/567xz81
loading . . .
1
3
1
reposted by
Alexandre Daubois
Les-Tilleuls.coop
19 days ago
Découvrez la version 1.1 de Ember, qui regroupe métriques, config' et gestion des certificats dans une seule interface de terminal, évitant ainsi de jongler entre plusieurs outils ou commandes complexes. Découvrez les nouveautés de cette release dans cet article :
les-tilleuls.coop/blog/ember-1...
0
1
1
In
#PHP
, stream_is_local() tells you if a stream is local or remote. One function. One bool. Pass a stream, a URL, or even just a wrapper name. Pretty neat, isn't it?
21 days ago
0
0
0
get_browser() is a user agent parser. Built into
#PHP
. Pass a UA string. Get back: browser name, version, platform, mobile, JavaScript support, CSS version, cookies. No external library. No API call. Uses the browscap.ini file. PHP ships a UA parser since ages.
22 days ago
1
2
0
Last week, I released Ember. This is the perfect companion for your @caddyserver &
#FrankenPHP
based apps. The feedbacks have been really great so far 🥳 Did you try it? Did you like it? Anything that can be improved? Let me know!
github.com/alexandre-da...
23 days ago
0
0
0
stream_set_chunk_size() controls
#PHP's
internal read buffer size per stream. Default is 8KB, but you can change it per stream. Downloading a huge file: 1MB chunks. Reading a serial port: 1 byte.
24 days ago
0
1
0
reposted by
Alexandre Daubois
Les-Tilleuls.coop
25 days ago
[Best of] Découvrez Ember, un dashboard temps réel pour votre terminal avec zero config', une seule commande et une visibilité immédiate. Ce projet open source est conçu par notre coopérateur
@alexdaubois.bsky.social
qui vous en parle en détails dans cet article :
les-tilleuls.coop/blog/ember-l...
loading . . .
Ember : Le monitoring temps réel pour Caddy et FrankenPHP est disponible | Les-Tilleuls.coop
Nous sommes ravis de vous annoncer la sortie de Ember dans sa première version, un outil d'observabilité taillé pour FrankenPHP et Caddy !
https://les-tilleuls.coop/blog/ember-le-monitoring-temps-reel-pour-caddy-et-frankenphp-est-disponible
1
2
1
Let's quickly breakdown the main view of Ember, our observability tool for Caddy apps and
#PHP
apps using FrankenPHP. The main view shows per-host traffic: RPS (requests per second), latency, in-flight requests (waiting to be handled), status code rates, all updating live.
25 days ago
0
0
0
stream_get_meta_data() tells you EVERYTHING about any open stream. Timed out? Blocking mode? Bytes in
#PHP's
internal buffer? Wrapper type? TLS cipher? HTTP response headers? One function, every detail about the stream's state.
26 days ago
0
0
0
Next minor version of Ember will ship a new "Caddy Config Tab". Caddyfiles are nice to read, and it'll be even nicer with a collapsible tree-view! This will make the DX even greater when working with @caddyserver and
#FrankenPHP
🧟 Learn about Ember:
github.com/alexandre-da...
28 days ago
0
0
0
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.
28 days ago
0
4
1
#PHP's
stream_socket_pair() creates two connected sockets in memory. No network, no file. Write to one, read from the other like a Unix pipe but bidirectional ↔️ The simplest IPC in PHP. No shared memory, no message queue and no temp files!
29 days ago
0
1
0
The first PR of Ember has been merged, thanks @yOyO38! It's not
#Go
or
#PHP
code. It's more important than ever to design tools to be agentic friendly. That's why agent skills has been added to Ember. any ideas on how to improve the tool? Hit me up with an issue or PR! 👀
about 1 month ago
0
0
0
#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!
about 1 month ago
0
5
2
More than 120 ⭐️ on GitHub for Ember in a few days, thanks to everyone supporting it! 🔥 The next gen tooling for
#PHP
is here. We're already discussing to add a plugin system so you can display your own info as well. Don't miss the announcement 👉
les-tilleuls.coop/en/blog/embe...
about 1 month ago
0
1
0
I'm both thrilled and proud to present Ember, the very first tool of its kind in the
#PHP
ecosystem 🔥🐘 Both a TUI and a prod/cloud-ready daemon, it provides a tremendous observability experience for
@caddy.bsky.social
and (optionally!) FrankenPHP All details here:
les-tilleuls.coop/en/blog/embe...
about 1 month ago
0
0
0
#PHP
has a built-in stream filter that converts character encoding on the fly. convert.iconv.FROM/TO. Attach it to any stream. Data is re-encoded as it flows through. Read a Shift_JIS file as UTF-8. No iconv() call. No mb_convert. Just fopen + filter.
about 1 month ago
0
3
2
In
#PHP
, stream_context_set_default() changes the default context for every stream operation in your entire script. Set it once. Every file_get_contents('http://...') that follows inherits your headers, timeouts, proxy, SSL config. Global behavior change, one call. Streams are widely underused!
about 1 month ago
1
1
1
#PHP
has a bucket brigade system. Like firefighters. Extend php_user_filter. Override filter(). Data flows through as "buckets" via stream_bucket_make_writeable(). You can build encryption, compression, sanitization layers that plug into ANY fopen/fread/fwrite call.
about 1 month ago
1
4
1
Day 2 of @symfony_live Paris! Full of announcements, what a conference again! Come by and ask all questions you may have about
#FrankenPHP
,
#PHP
, @ApiPlatform... Or even about what I showcased live yesterday to have some info before the official release 😉
about 1 month ago
0
2
1
La saison des conférences continue, et nous sommes présents à @symfony_live Paris cette année encore avec @coopTilleuls! Je serai présent durant les 2 jours, n"hésitez pas à passer pour discuter de FrankenPHP,
#PHP
ou tout autre sujet comme d'habitude !
about 1 month ago
0
3
0
Follow us, don’t miss it! 😉
add a skeleton here at some point
about 1 month ago
0
2
0
In
#PHP
, str_word_count() has a "secret" second argument. Format 0: count. Format 1: array of words. Format 2: associative array with byte positions as keys. A word-position indexer. In one native function call. The third argument lets you define what counts as a "word character."
about 1 month ago
0
1
1
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!
about 1 month ago
0
4
3
#PHP
has a built-in Euclidean distance function, if you need to calculate a distance! Sounds complex, but it's just the hypothenuse! Without the overflow risk of doing it manually. If you ONLY need to *compare* distances, don't miss the tip at the end of the code snippet!
about 1 month ago
0
0
0
AppendIterator concatenates iterators end-to-end in
#PHP
. Two generators. Three directories. A CSV + an API response. Treat them as one stream. No array_merge(). No intermediate array. No memory spike. I *really* wish I knew this earlier 😅
about 1 month ago
0
3
1
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!
about 1 month ago
0
0
1
CallbackFilterIterator is
#PHP
array_filter() but lazy. Wrap any iterator. Pass a callback. Only matching elements come through. No intermediate array, no memory spike, works on generators, files, anything Traversable! The filter nobody imports.
about 1 month ago
0
1
0
The
#JsonPath
@symfony component just got an upgrade! Per the RFC, it is now possible to declare custom functions to be parsed and used in your JSON paths. The component is now complete: RFC-compliant, extendable... Maybe you have ideas for it?
github.com/symfony/symf...
about 1 month ago
0
2
3
CachingIterator exposes hasNext() in
#PHP
. The method every dev wished iterators had. It caches 1 element ahead. Problems like "add comma after every item except last one" are easier with this (if you can't implode()). Iterators are often 1 step behind, this class fixes that.
about 2 months ago
0
0
2
#PHP
has Python's zip(). It's called MultipleIterator. Iterate over multiple arrays in parallel. Same position, all at once. No array_map(null, ...) hack. No manual index tracking. Python got zip(). PHP got MultipleIterator. Since 5.3. Now that's a great finding! Isn't it?
about 2 months ago
0
4
0
#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 😅
about 2 months ago
1
5
0
Heading to @dpcon for the third consecutive year! Speaking tomorrow about
#FrankenPHP
and how it'll take your
#PHP
apps to the next level 😉 Feel free to come by during the whole conference to talk about the ecosystem, open-source, contributing... or whatever you'd like really!
about 2 months ago
0
0
0
ob_start() has 3 arguments nobody uses in
#PHP
. "chunk_size": auto-flush every N bytes. "flags": lock buffer (non-cleanable, non-flushable, non-removable) "phase" in the callback: know exactly WHY your handler was invoked. Did you try already try?
about 2 months ago
0
2
0
All projects require some monkey work,
#PHP
interpreter is no exception. Parsing functions params is done with ZPP or fast ZPP, many being converted to the latter. Does it mean many native functions will be slightly faster? Yes! Should I do a thread about how params are parsed by PHP?
about 2 months ago
1
1
1
Closure::bind() lets you break into any
#PHP
object's private scope. Bind a closure to an object, access private props, call private methods. It can even replace reflection sometimes, and it certainly is faster. The testing tool nobody taught you 😉 (please don't do that)
about 2 months ago
0
0
0
php://memory is a stream that lives in RAM. php://temp starts in RAM, spills to disk after 2MB (configurable, see below!). No tmpfile(). No temp directory. No cleanup. Perfect for building files in memory before sending in
#PHP
! Did you know the "maxmemory: " trick?
about 2 months ago
1
14
4
SplFixedArray uses ~60% less RAM than a regular array in
#PHP
. That's because regular ones are always (re)allocated with a power-of-2 capacity. 1025 elements? 2048 allocated! Fixed size. Integer keys only. No hash table overhead. Since 5.3. I almost never see it used, do you?
about 2 months ago
1
4
2
Load more
feeds!
log in