PHP: defined - Manual in Deutsh
PHP: defined - Manual in French
PHP: defined - Manual in Polish

You Are At PHP: defined - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

defined

(PHP 3, PHP 4, PHP 5)

defined -- Checks whether a given named constant exists

Description

bool defined ( string name )

Checks whether the given constant exists and is defined.

Note: If you want to see if a variable exists, use isset() as defined() only applies to constants. If you want to see if a function exists, use function_exists().

Parameters

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 'CONSTANT' is the name of a constant named CONSTANT */
if (defined('CONSTANT')) {
    echo
CONSTANT;
}
?>

See Also

define()
constant()
get_defined_constants()
function_exists()
The section on Constants

szkolenia zawodowe kursy zawodowe przygotowanie do zawodu
Crm dedykowany
najlepsza strona blogs o UKS profesjonalne wyniki
Skuteczne pozycjonowanie stron łódź i cała Polska.
przetargi Adamówka

Another Useful functions:


zend-macro.zend-define-property | language.variables.predefined | language.constants.predefined | function.swf-definetext | function.swf-definerect | function.swf-definepoly | function.swf-defineline | function.swf-definefont | function.swf-definebitmap | function.runkit-method-redefine | function.runkit-function-redefine | function.runkit-constant-redefine | function.pdf-define-layer | function.ocidefinebyname | function.oci-define-by-name | function.ncurses-define-key | function.get-defined-vars | function.get-defined-functions | function.get-defined-constants | function.defined | function.define | function.define-syslog-variables | function.classkit-method-redefine | function.apc-define-constants |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.