downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

apc_sma_info> <apc_inc
[edit] Last updated: Fri, 23 Mar 2012

view this page in

apc_load_constants

(PECL apc >= 3.0.0)

apc_load_constants Önbellekten bir sabit kümesini yükler

Açıklama

bool apc_load_constants ( string $anahtar [, bool $buyukluk_duyarli = true ] )

Önbellekten bir dizi sabiti yükler.

Değiştirgeler

anahtar

Sabitleri yığın halinde apc_define_constants() ile önbelleğe saklarken verilmiş isim.

buyukluk_duyarli

İşlevin öntanımlı davranışı harf büyüklüğüne duyarlıdır, yani SABIT ile Sabit farklı değerlerdir. Eğer bu değiştirge FALSE olarak ayarlanırsa sabitler harf büyüklüğüne duyarsız sembollerle tanımlanacaktır.

Dönen Değerler

Başarı durumunda TRUE, başarısızlık durumunda FALSE döner.

Örnekler

Örnek 1 - apc_load_constants() örneği

<?php
$sabitler 
= array(
    
'BIR'   => 1,
    
'IKI'   => 2,
    
'UC' => 3,
);
apc_define_constants('sayilar'$sabitler);
apc_load_constants('sayilar');
echo 
BIRIKIUC;
?>

Yukarıdaki örneğin çıktısı:

123

Ayrıca Bakınız



add a note add a note User Contributed Notes apc_load_constants
webmaster at thedigitalorchard dot ca 25-Apr-2010 05:41
There doesn't seem to be a way to store constants that have already been defined. This function, apc_define_constants(), does both things: (1) defines a constant, and (2) stores the constant in the cache. This is unfortunate, since it introduces the requirement to handle constant definitions differently when APC is not available.

(If this function had a "$do_not_define" parameter, or the like, that would give it more flexibility. I suppose filing a bug report would be a step in the right direction to getting this idea considered.)

 
show source | credits | stats | sitemap | contact | advertising | mirror sites