ffi/var-dumper
Adds Symfony VarDumper support for PHP FFI types so dd() and dump() render structs, arrays, pointers, and more in a readable form. Includes “unsafe access” detection for risky pointer reads, with an env flag (VAR_DUMPER_FFI_UNSAFE=1) to fully inspect data.
var_dumper.VAR_DUMPER_FFI_UNSAFE.var_dump() shows FFI\CData without context).dd() for PHP types suffices).For Executives:
"This package lets us debug C/C++ integrations in PHP as easily as we debug native PHP code. For example, if we’re using FFI to call a high-performance library (e.g., for image processing or hardware control), we’ll now see structured dumps of C structs/pointers—just like Symfony’s dd()—instead of cryptic FFI\CData objects. This reduces debugging time for critical integrations by 30–50%, justifying the investment in FFI-based performance optimizations."
For Engineering:
*"This is a drop-in replacement for Symfony’s var_dumper but specialized for FFI types. Key benefits:
dd($ffiStruct) now shows human-readable C struct layouts (e.g., struct { float x: 3.14 }).For Developers:
*"Install it with composer require ffi/var-dumper, and suddenly:
$ffiStruct = FFI::new('struct { int id; char* name; }');
dd($ffiStruct); // Shows: struct { id<int>: 42, name<char*>: "Alice" }
No more guessing what’s in your FFI objects—just like var_dump() but for C types. Even handles edge cases like unsafe pointers (toggle with VAR_DUMPER_FFI_UNSAFE=1)."*
How can I help you explore Laravel packages today?