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 #171037 is a reply to message #171035] Wed, 15 December 2010 18:14 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
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).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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 02:53:51 GMT 2024

Total time taken to generate the page: 0.04274 seconds