Connecting Tech Pros Worldwide Forums | Help | Site Map

Why PHP don't Report this SYNTAX ERROR ?

nvn
Guest
 
Posts: n/a
#1: Sep 25 '08
Hi everyone:

my code is like this:
/------------ file error.php ------------------------------------
<?php

print("first\n");
print("second\n"));
print("third\n");

?>
--------------file error.php------------------------------------/

There is a unmatched ")" in the print "second" line, so the syntax is
error.
But when I execute it, I get nothing, there is no SYNTAX ERROR
report !
So if this error be hidden in a big file, it is hard to find out.
Any one has any good idea ?


Geoff Berrow
Guest
 
Posts: n/a
#2: Sep 25 '08

re: Why PHP don't Report this SYNTAX ERROR ?


Message-ID:
<230163dd-0037-4023-9ae9-84ac0d9fcfdf@s9g2000prg.googlegroups.comfrom
nvn contained the following:
Quote:
>my code is like this:
>/------------ file error.php ------------------------------------
><?php
>
>print("first\n");
>print("second\n"));
>print("third\n");
>
>?>
>--------------file error.php------------------------------------/
>
>There is a unmatched ")" in the print "second" line, so the syntax is
>error.
>But when I execute it, I get nothing, there is no SYNTAX ERROR
>report !
Well I get one. Check your error reporting level.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Closed Thread