Unix and Linux Discussions Tagged with exists |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
6,263 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
8,514 |
Shell Programming and Scripting |
|
|
|
5 |
7,914 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
9,223 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,942 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,923 |
Shell Programming and Scripting |
|
|
|
9 |
4,011 |
Shell Programming and Scripting |
|
|
|
3 |
5,405 |
Shell Programming and Scripting |
|
|
|
6 |
23,590 |
HP-UX |
|
|
|
1 |
9,718 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,783 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
6,878 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,023 |
Shell Programming and Scripting |
|
|
|
3 |
3,408 |
UNIX for Dummies Questions & Answers |
|
|
|
27 |
10,968 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,135 |
Programming |
|
|
|
20 |
34,679 |
Cybersecurity |
|
|
|
1 |
2,801 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,945 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
3,824 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,443 |
Programming |
|
|
|
1 |
2,937 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,102 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
18,537 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
25,438 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
6,708 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
36,961 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
15,217 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,592 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,934 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
12,077 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,460 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,368 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,979 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,126 |
UNIX for Dummies Questions & Answers |
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)