Re: Cause of:`T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR'
| From: | Fred | Date: | Sun, 02 Dec 2001 01:00:53 +0000 |
| Subject: | Re: Cause of:`T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76332@lists.php.net to get a copy of this message | ||
A couple of more pointers:
Check the line right before the parse error for missing }) or ;
Always close your curley braces right after you open them and then insert
your code lines between the braces. {} This will prevent you from
forgetting to close your braces.
Never write a single script with 2149 lines of code ;)
Fred
Jason G. <blair@nb.net> wrote in message
news:5.1.0.14.0.20011201180629.037de0e8@pop3.nb.net...
> Hello all,
>
> I have ran across this error a number of times, and for those of you who
> are or will pulling out your hair, read on.
>
> When you get a:
>
> Parse error: parse error, expecting
T_OLD_FUNCTION' or
> T_FUNCTION' or
> T_VAR' or '}'' in your_script.php on line
> 2149
>
> Check to see if you have all of you { and } intact.
> The error could be thousands of lines away, but the error message may
point
> to the end of your file.
>
> I notice this behavior when I am working on class definitions and forget
to
> open close a block (switch, for, while) in a method in the class
somewhere.
>
> Hope it helps someone.
>
> -Jason Garber
> IonZoft.com
>
>
>
>