Debugging with gdb and valgrind
47/71
gdb --args php
....
To make it easier:
Make sure PHP is compiled in debug mode
Disable the Zend memory manager:
export USE_ZEND_ALLOC=0
Disable shared extension unloading:
export ZEND_DONT_UNLOAD_MODULES=1