Re: Auto Syntax Checking on Execute -- disable?
| From: | Matt | Date: | Sun, 15 Sep 2002 18:35:55 +0000 |
| Subject: | Re: Auto Syntax Checking on Execute -- disable? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116458@lists.php.net to get a copy of this message | ||
>From: "Jason Caldwell" <jason@thinkingman.org>
>Sent: Sunday, September 15, 2002 2:14 PM
>Subject: Re: [PHP] Auto Syntax Checking on Execute -- disable?
> I understand that PHP is interpreted. I'm a C/C++ programmer too ;-)
> However, there is this detectable/ noticeable micro-second where my
scripts
> are being "checked" *before* they execute -- I can understand having this
> "pre-execute checking" enabled for dev purposes -- however, for
> production -- no.
>
> There must be a way to turn off pre-execution syntax checking. I'm not
> speaking of detecting an error *during* execution -- I'm talking about
> *pre-execution* syntax checking.
Hey Jason - I don't think so because the parser has to evaluate the file.
To do that it has to follow the syntax of the language. In other words, I
don't think it's syntax checking for you, it's doing it for itself to
understand how to execute the code, and when it finds an error, it stops.
That's what I was meaning when I asked what you'd expect it to do when it
encountered an error. Because there's no intermediate code representation,
or machine readable binary, php has to evaluate the source each time.
It could be that the encoders will skip this step. Check out the Zend
Encoder at http://www.zend.com and http://www.php-encoder.com.