php man page for apc_exists

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 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_inc(3) - php
json_encode(3) - php
apc_cas(3) - php
unset(3) - php
Similar Topics in the Unix Linux Community
display and output...question
Check if file exists, and create file
Script to check file exists
Statement to find if an entry exists in a file
Parsing a control file loop