I am newbie on PHP. Here is my situation. I write my code in vim and put it under /var/www/ then I can use
localhost/*.php
You can use error_reporting() at the top of your code...
error_reporting(E_ALL);
You will also want display_errors on in php.ini.
php.ini
Note that you should have public facing error reporting off in a production environment.