defined(3) php man page | unix.com

Man Page: defined

Operating Environment: php

Section: 3

DEFINED(3)								 1								DEFINED(3)

defined - Checks whether a given named constant exists

SYNOPSIS
bool defined (string $name)
DESCRIPTION
Checks 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).
PARAMETERS
o $name - The constant name.
RETURN VALUES
Returns TRUE if the named constant given by $name has been defined, FALSE otherwise.
EXAMPLES
Example #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 ALSO
define(3), constant(3), get_defined_constants(3), function_exists(3), The section on Constants. PHP Documentation Group DEFINED(3)
Related Man Pages
array_key_exists(3) - php
apc_load_constants(3) - php
bcompiler_write_constant(3) - php
defined(3) - php
method_exists(3) - php
Similar Topics in the Unix Linux Community
using awk to extract text between two constant strings
Search for exact string
extract string until regexp from backside
Download the file
Grep a specific process name