Why PHP don't Report this SYNTAX ERROR ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nvn

    Why PHP don't Report this SYNTAX ERROR ?

    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

    #2
    Re: Why PHP don't Report this SYNTAX ERROR ?

    Message-ID:
    <230163dd-0037-4023-9ae9-84ac0d9fcfdf@s9 g2000prg.google groups.comfrom
    nvn contained the following:
    >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 011000100110110 0010000000110
    001101101011011 001000110111101 100111001011
    100110001101101 111001011100111 010101101011
    http://slipperyhill.co.uk - http://4theweb.co.uk

    Comment

    Working...