Re: php error reporting problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 10:57 AM 3/28/2006, ngwarai zed wrote:
hi, I omitted a semicolon ; at the end of a php statement on purpose to  see
what the error looks like. I ran the script and a blank page just  came
out.No error message. I then edited php.ini and set Display_errors  = On and
errror_reporting = E_ALL then restarted httpd. Ran the script  again and the
same thing happens. My question is:- how do I make php to show me a simple
error like omitting a semicolon?

If you omit the semicolon at the end of a line, PHP attempts to join it with the next line into one statement. Sometimes, by coincidence, this results in a legal statement. To show the error message, enter two statements that you're sure will combine into invalid syntax, such as:

        $x = 4
        $y = 3;

Their concatenation results in:

        $x = 4 $y = 3;

which should get you "parse error, unexpected T_VARIABLE."

Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux