Possible Duplicate:
How to get useful error messages in PHP?
Im currently learning php and at the same time a bit of ruby on rails, one of the thing ive noticed about ruby on rails that i really like is when theres an error on page, it will display you an error page pointing you in the direction of what is wrong.. like the image bellow
But when i get an error in php i just get a blank page, which means i have to read through each line of code to try and find what went wrong, as ive just started most of my errors tend to be little syntax problems, which are relatively easy to fix, but relatively hard to find if you've missed a ;
off the end of a line.
Is there a line that i could put into my <head>
during development to show me these errors ? Somthing like <?php show_errors ?>
Or is there an alternative, at the moment im using sublime text 2, Mamp and Firefox to work in. Is there a setting in any of those that i can turn on to allow me to see errors, either code validation in sublime text 2 or a setting in mamp or firefox that will show me an error page instead of a blank one ?
If i was to use a framework do any of them have built in error alerts ?