apc_exists(3) php man page | unix.com

Man Page: apc_exists

Operating Environment: php

Section: 3

APC_EXISTS(3)								 1							     APC_EXISTS(3)

apc_exists - Checks if APC key exists

SYNOPSIS
mixed apc_exists (mixed $keys)
DESCRIPTION
Checks if one or more APC keys exist.
PARAMETERS
o $keys - A string, or an array of strings, that contain keys.
RETURN VALUES
Returns 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.
EXAMPLES
Example #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 ALSO
apc_cache_info(3), apc_fetch(3). PHP Documentation Group APC_EXISTS(3)
Related Man Pages
apc_fetch(3) - php
apc_add(3) - php
json_encode(3) - php
apc_store(3) - php
unset(3) - php
Similar Topics in the Unix Linux Community
File exists and is empty
Basic Error
echo statement issue
remove space between the operator, script required...
Check if file exists, and create file