Query: apc_exists
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
APC_EXISTS(3) 1 APC_EXISTS(3) apc_exists - Checks if APC key existsSYNOPSISmixed apc_exists (mixed $keys)DESCRIPTIONChecks if one or more APC keys exist.PARAMETERSo $keys - A string, or an array of strings, that contain keys.RETURN VALUESReturns TRUE if the key exists, otherwise FALSE Or if an array was passed to $keys, then an array is returned that contains all existing keys, or an empty array if none exist.EXAMPLESExample #1 apc_exists(3) example <?php $fruit = 'apple'; $veggie = 'carrot'; apc_store('foo', $fruit); apc_store('bar', $veggie); if (apc_exists('foo')) { echo "Foo exists: "; echo apc_fetch('foo'); } else { echo "Foo does not exist"; } echo PHP_EOL; if (apc_exists('baz')) { echo "Baz exists."; } else { echo "Baz does not exist"; } echo PHP_EOL; $ret = apc_exists(array('foo', 'donotexist', 'bar')); var_dump($ret); ?> The above example will output something similar to: Foo exists: apple Baz does not exist array(2) { ["foo"]=> bool(true) ["bar"]=> bool(true) }SEE ALSOapc_cache_info(3), apc_fetch(3). PHP Documentation Group APC_EXISTS(3)
Related Man Pages |
---|
apc_fetch(3) - php |
apc_add(3) - php |
apc_exists(3) - php |
apc_store(3) - php |
unset(3) - php |
Similar Topics in the Unix Linux Community |
---|
search and Replace |
File exists and is empty |
create array holding characters from sring then echo array. |
echo statement issue |
Check if file exists, and create file |