Warning: file_put_contents(): Only -1 of 48 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
connection_timeout define Misc. PHP Manual constant (PHP 4 >= 4.0.4, 5) — Returns the value of a 설명 mixed ( string $name ) Return indicated by name . constant() is useful if you need to re...
Forum und email

constant

(PHP 4 >= 4.0.4, PHP 5)

constant — Returns the value of a constant

설명

mixed constant ( string $name )

Return the value of the constant indicated by name .

constant() is useful if you need to retrieve the value of a constant, but do not know its name. I.e. it is stored in a variable or returned by a function.

This function works also with class constants.

매개변수

name

The constant name.

반환값

Returns the value of the constant, or NULL if the constant is not defined.

예제

Example#1 constant() example

<?php

define
("MAXSIZE"100);

echo 
MAXSIZE;
echo 
constant("MAXSIZE"); // same thing as the previous line

?>

ì°¸ê³