I have wondered why my php script doesn't show errors like it did before. It seems my server admin has default config set not to show the errors. Here's how to override it.
error_reporting(E_ALL); ini_set('display_errors', '1');
BTW, it's really a pain to code in a language that demand a ';' after every line.