Unix and Linux Discussions Tagged with exists |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
6,192 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
8,493 |
Shell Programming and Scripting |
|
|
|
5 |
7,864 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
9,142 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,908 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,920 |
Shell Programming and Scripting |
|
|
|
9 |
4,009 |
Shell Programming and Scripting |
|
|
|
3 |
5,397 |
Shell Programming and Scripting |
|
|
|
6 |
23,574 |
HP-UX |
|
|
|
1 |
9,697 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,777 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
6,871 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,000 |
Shell Programming and Scripting |
|
|
|
3 |
3,396 |
UNIX for Dummies Questions & Answers |
|
|
|
27 |
10,934 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,123 |
Programming |
|
|
|
20 |
34,592 |
Cybersecurity |
|
|
|
1 |
2,791 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,901 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
3,799 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,414 |
Programming |
|
|
|
1 |
2,912 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,075 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
18,495 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
25,392 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
6,669 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
36,846 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
15,164 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,534 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,902 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
12,034 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,379 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,334 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,931 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,056 |
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)