Query: defined
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DEFINED(3) 1 DEFINED(3) defined - Checks whether a given named constant existsSYNOPSISbool defined (string $name)DESCRIPTIONChecks whether the given constant exists and is defined. Note If you want to see if a variable exists, use isset(3) as defined(3) only applies to constants. If you want to see if a function exists, use function_exists(3).PARAMETERSo $name - The constant name.RETURN VALUESReturns TRUE if the named constant given by $name has been defined, FALSE otherwise.EXAMPLESExample #1 Checking Constants <?php /* Note the use of quotes, this is important. This example is checking * if the string 'TEST' is the name of a constant named TEST */ if (defined('TEST')) { echo TEST; } ?>SEE ALSOdefine(3), constant(3), get_defined_constants(3), function_exists(3), The section on Constants. PHP Documentation Group DEFINED(3)
Related Man Pages |
---|
apc_load_constants(3) - php |
class_exists(3) - php |
constant(3) - php |
function_exists(3) - php |
template::namespace::constants(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Search for exact string |
How to compare file name with a string |
Get last lines of file after last line with word TEST |
Download the file |
Checking if file exists and unzipping |