phpdbg(1)

πŸ“¦
version 8.2.35 Β· 3 versions
, in debian bookworm

πŸ’… phpdbg β€” the interactive PHP debugger, bestie edition πŸ’…

okay so real talk: this is phpdbg(1), from the Scripting Language manual section, and it's genuinely one of the most underrated little glow-ups in the PHP ecosystem. no cap.


✨ NAME ✨

phpdbg β€” the interactive PHP debugger πŸ›πŸ’–


✨ SYNOPSIS ✨

phpdbg [options] [file] [args...]

✨ DESCRIPTION ✨

phpdbg is a lightweight, powerful, easy to use debugging platform for PHP. that's it, that's the summary, and honestly? it ate. πŸ’…βœ¨

it's giving "I will find your bug and I will do it with style." no cap, this thing is small enough to not get in your way but strong enough to actually be useful, which is a combination that lowkey shouldn't be possible but here we are.


✨ OPTIONS ✨

  • -c path|file β€” tell phpdbg where to look for your php.ini. either give it a path (a directory to search in) or point it straight at a specific file πŸŽ€
  • -d foo[=bar] β€” define the INI entry foo, and if you want it to have a value, set it to bar. the =bar part is optional, so -d foo is valid too 🫢
  • -n β€” nope, no php.ini file for us today. none. zero. we're going in bare-faced πŸ’€
  • -z file β€” load a Zend extension from file ⭐
  • -q β€” quiet mode, bestie. no banner printed on startup. we're skipping the little intro and getting straight to the plot πŸ“΅
  • -v β€” turn on oplog output πŸ‘‘
  • -b β€” disables color on the console. yes this is the "my terminal theme is a crime scene" option and yes we respect it 🌈
  • -i path|file β€” override where .phpgdbinit lives. heads up: this one implies -I, so it comes with consequences ✨
  • -I β€” ignore .phpdbginit entirely (that's the default init file, btw) πŸ™ˆ
  • -r β€” jump straight to run. no detours, no small talk, we're going πŸƒβ™€οΈπŸ’¨
  • -e β€” generate extended information for the debugger/profiler πŸ”₯
  • -E β€” enable step through eval() 🧚
  • -s delimiter β€” read the code you want to execute from stdin, with an optional delimiter to keep it tidy πŸ“
  • -S sapi_name β€” override the SAPI name πŸ’œ
  • -p opcode β€” output opcodes and then quit. like, immediately. bye πŸ‘‹
  • -h β€” print the help overview, the classic "what does anything do" move 🌸
  • -V β€” version number, for when you need receipts πŸ“‹
  • args... β€” arguments passed straight to the script. ⚠️ but listen: use -- before your args when the first argument starts with -, or when the script is being read from stdin. this is the "please stop eating my flags" clause, and it is not optional 🚨

✨ NOTES ✨

passing -rr will cause phpdbg to quit after execution, instead of returning you to the console. so you get one run and then it's gone, like a situationship πŸ₯²

✨ FILES ✨

  • php.ini β€” the standard configuration file, the blueprint, the origin story πŸŽ€
  • .phpdbginit β€” the init file ✨

✨ SEE ALSO ✨

the online manual lives at http://php.net/manual/book.phpdbg.php β€” go read it, iykyk πŸ“šπŸ’–


✨ BUGS ✨

you can browse the list of known bugs, or report any brand new bug you found, at https://github.com/php/php-src/issues πŸ›

(if you find a bug, telling the maintainers is the main character move. periodt. πŸ‘‘)


✨ AUTHORS ✨

written by Felipe Pena, Joe Watkins and Bob Weinand, and formatted by OndΕ™ej SurΓ½ for the Debian project. iconic lineup, honestly πŸ’…

a list of active developers can be found at http://www.php.net/credits.php ⭐

and last but not least, PHP was developed with the help of a huge amount of contributors all around the world. that's not a footnote, that's the whole vibe. global effort, global slay πŸŒπŸ’–


✨ VERSION INFORMATION ✨

this manpage describes phpdbg, for PHP version 8.2.35 πŸ”–


Copyright Β© The PHP Group

this source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: https://www.php.net/license/3_01.txt

if you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. we got you 🫢


okay that's the whole page, bestie! this one was shipped by The PHP Group in 2024 and it's documenting phpdbg(1) for the Scripting Language crowd. go debug something and make it look effortless πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from