Skip to content

Instantly share code, notes, and snippets.

@sergeyklay
Last active July 15, 2021 08:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergeyklay/c2f85c14b4c4caf923f80e4b5f90a5c0 to your computer and use it in GitHub Desktop.
Save sergeyklay/c2f85c14b4c4caf923f80e4b5f90a5c0 to your computer and use it in GitHub Desktop.
Happy PHP Debugging

Happy PHP Debugging

Usage

gdb --args /usr/bin/php script.php
(gdb) source ~/src/php/7.2.1/.gdbinit
(gdb) set print object on
(gdb) set print pretty on
(gdb) zbacktrace
(gdb) ptype ht.arData.key
type = struct _zend_string {
    zend_refcounted_h gc;
    zend_ulong h;
    size_t len;
    char val[1];
} *

Links

GDB
Blogs
Other links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment