RE: [PHP-QA] Re: RC6 doesn't mind function redefinition
| From: | Cynic | Date: | Wed, 04 Apr 2001 14:41:45 +0000 |
| Subject: | RE: [PHP-QA] Re: RC6 doesn't mind function redefinition | ||
| References: | 1 2 3 4 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2789@lists.php.net to get a copy of this message | ||
It's in a require()d file. I thought require() was a compile-time
thing (as opposed to runtime include()), but looks like I'm
wrong.
At 00:19 4.4. 2001, Zeev Suraski wrote the following:
--------------------------------------------------------------
>At 22:02 3/4/2001, Cynic wrote:
>>Anyway, shouldn't PHP terminate the script during compilation?
>>I thought function redeclarations were compile errors, but it
>>looks as if they're runtime errors, and the whole script got
>>executed(?).
>
>If it's inside an include file, then remember include files are only evaluated in run-time
>of their parent script. So it's compile-time for them, but run-time in general.
>
>Zeev
cynic@mail.cz
-------------
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7