(PHP 4, PHP 5, PHP 7)
define — ����һ������
������ʱ����һ��������
name��������
value
������ֵ���� PHP 5 �У�value �����DZ���( integer��
float��string��boolean��NULL���� PHP 7 �л������Ǹ� array ��ֵ��
���������Զ���Ϊ resource ���ͣ��������Ƽ�����������Ϊ���ܻ��в���Ԥ֪����Ϊ������
case_insensitive
�������Ϊ TRUE���ó������Сд�����С�Ĭ���Ǵ�Сд���еġ����磬
CONSTANT �� Constant �����˲�ͬ��ֵ��
Note:
��Сд�����еij�����Сд�ķ�ʽ���档
�ɹ�ʱ���� TRUE�� ������ʧ��ʱ���� FALSE��
Example #1 ���峣��
<?php
define("CONSTANT", "Hello world.");
echo CONSTANT; // ��� "Hello world."
echo Constant; // ��� "Constant" ������ Notice
define("GREETING", "Hello you.", true);
echo GREETING; // ��� "Hello you."
echo Greeting; // ��� "Hello you."
// PHP 7 ��Ϳ���������
define('ANIMALS', array(
'dog',
'cat',
'bird'
));
echo ANIMALS[1]; // ��� "cat"
?>