Debug output hasn’t changed much.
Launch the PHP REPL by running php -a in your terminal.
php -a
PHP comes with an interactive debugger called Xdebug.
A widely-used tool for testing in PHP is PHPUnit.