On 6/17/25 9:54 PM, Braunson Yager wrote:
I'd like to gauge interest in adding two debugging functions to PHP core: dd() 
and dump().

Going out of your way to deliberately conflict with two very popular userland function names is a bad idea.

*Enhanced Features Over Existing Solutions
*- Native performance (no userland overhead)
- Stack trace integration
- Memory usage reporting
- Execution timing (potentially)
- Better CLI formatting

All of these except the native performance already exist in userland dumpers, and if you're counting xdebug's var_dump implementation then you can scratch off native performance too.

*Why Core vs Userland?
*Similar to how var_dump() provides basic introspection, these functions would offer enhanced debugging capabilities that benefit the entire ecosystem, not just framework users.

The primary feature of these dumpers isn't "Enhanced debugging capabilities" it's pretty printing in HTML output. Color highlighting and unfolding are nice bonuses but they aren't present in other languages by default either (eg. Rust's Debug trait)

Xdebug var-dumper and kint are all framework agnostic (And neither xdebug nor kint even require composer) so I don't understand how the existing solutions "just" benefit framework users.

If anything I'd say core PHP already has too many dump functions: print_r and var_dump do essentially the same thing, with minor variations in debug_zval_dump and var_export

- Jonathan

Reply via email to