krakjoe/phpdbg — pull request #41 by Hywan (2013-12-18 12:09:44+00:00)
Title: Remove phpdbg_help_header() output, too verbose

Hello :-),

Each time we type `help …`, the `[Welcome to phpdbg, the interactive PHP debugger, v%s]` message is printed. I think this is too verbose. This message is printed when we start the REPL, no need to print it each time we ask some help.

After a short discussion on IRC, it seems the header is printed just to get the version number. Thus, I propose this patch to simplify it a bit:

* the `phpdbg_help_header` macro unfolds to `NULL`, in this way, we didn't break the existing code and allow the reuse of this macro,
* the `phpdbg_help_footer` macro now includes the version number.

Also, I am planning to *(i)* add the `help version` command, *(ii)* expose the phpdbg version through a PHP constant (maybe `PHPDBG_VERSION_ID`, to be consistent with [`PHP_VERSION_ID`](http://php.net/reserved.constants#constant.php-version-id), *(iii)* add a `phpdbg` option to get the version directly (`-v` is already taken to enable oplog output, maybe `-V` could be a good candidate).

Thoughts?