FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » require*/include*: compile-time or runtime?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: require*/include*: compile-time or runtime? [message #171040 is a reply to message #171037] Wed, 15 December 2010 19:48 Go to previous messageGo to previous message
pakalk is currently offline  pakalk
Messages: 3
Registered: December 2010
Karma:
Junior Member
On 15 Gru, 19:14, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 12/15/2010 11:39 AM, pakalk wrote:
>
>> On 9 Gru, 01:11, Helmut Chang<use...@helmutchang.at>  wrote:
>
>>> const FOO = 'Foo'.'Bar';
>
>>> or
>
>>> const BAR = 1 + 2;
>
>> Are you sure it is executed at compile-time?
>
> He is correct.  Constants are evaluated at compile time, which is why
> you cannot use an expression to initialize them.
>
> When you think about it, it makes sense.  A constant is only evaluated
> once, not every time you go past the definition (i.e. in a function).
>

Of course, it should be constant :) But I do not know if parse error
is constant evaluation error ;) I mean.. it is syntax error, widely-
considered instruction is not executed.

Nevermind :) I am too poor in english to provide my point of view
clearly :D (But I think about: "compile-time instruction" == "can do
sth during compile-time", not "it is parsed at compile-time")

Include/require are both run-time.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: drupal php google analytics
Next Topic: Adsense approval Trick
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 19:46:33 GMT 2024

Total time taken to generate the page: 0.04347 seconds