Unix and Linux Discussions Tagged with exists |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
6,270 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
8,518 |
Shell Programming and Scripting |
|
|
|
5 |
7,926 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
9,237 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,947 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,923 |
Shell Programming and Scripting |
|
|
|
9 |
4,011 |
Shell Programming and Scripting |
|
|
|
3 |
5,406 |
Shell Programming and Scripting |
|
|
|
6 |
23,594 |
HP-UX |
|
|
|
1 |
9,719 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,783 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
6,880 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,027 |
Shell Programming and Scripting |
|
|
|
3 |
3,410 |
UNIX for Dummies Questions & Answers |
|
|
|
27 |
10,975 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,137 |
Programming |
|
|
|
20 |
34,688 |
Cybersecurity |
|
|
|
1 |
2,801 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,955 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
3,828 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,446 |
Programming |
|
|
|
1 |
2,939 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,105 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
18,544 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
25,449 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
6,715 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
36,977 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
15,224 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,601 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,934 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
12,082 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,467 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,370 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,984 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
19,138 |
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)