Unix and Linux Discussions Tagged with exists |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
6,228 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
8,502 |
Shell Programming and Scripting |
|
|
|
5 |
7,884 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
9,163 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,920 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,921 |
Shell Programming and Scripting |
|
|
|
9 |
4,011 |
Shell Programming and Scripting |
|
|
|
3 |
5,401 |
Shell Programming and Scripting |
|
|
|
6 |
23,580 |
HP-UX |
|
|
|
1 |
9,705 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,778 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
6,871 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,002 |
Shell Programming and Scripting |
|
|
|
3 |
3,401 |
UNIX for Dummies Questions & Answers |
|
|
|
27 |
10,945 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,126 |
Programming |
|
|
|
20 |
34,627 |
Cybersecurity |
|
|
|
1 |
2,796 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,914 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
3,802 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,428 |
Programming |
|
|
|
1 |
2,922 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,085 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
18,516 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
25,411 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
6,678 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
36,886 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
15,181 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,552 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,911 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
12,050 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,406 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,344 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,945 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,086 |
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)