Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI

[email protected] (Rasmus Lerdorf) Sat, 17 Feb 2007 22:13:24 -0800
Newsgroups php.apc.dev
Message-ID <[email protected]>
Brian Shire wrote:
> 
>> Seems to me that I just made a mistake in the docs.
>> I'll just fix the example and add a note to the docs that indicate that
>> apc_define_constants() not only stores constants within APC, but also
>> actually defines the constants in the current request.
>>
>> Unless anyone thinks that the behaviour should be changed (FWIW, I
>> don't).
> 
> Fine by me, just want to make sure that it works for Gopal...

Note that this constants stuff was basically a failed experiment on my
part.  I thought it would speed up constant handling, but it really
doesn't.  The slowness is in the internal calls that register the
constants and those aren't avoided by this.

We should note in the documentation that these two functions probably
aren't useful and if they are really looking to speed up constant
handling they should have a look at Gopal's ini constant pecl extension
which lets you define constants on server startup.

-Rasmus