Usage One: const is used for class member variables, once defined cannot be modified, define is used for global constants, is not used for definitions of class member variables, const can be used in classes or outside classes, define cannot.
Definition: const constant NAME = value; No $ symbol
Access: Class Name:: Constant Name or interface name:: Constant name as
is to access the direct constant name outside the class
Usage Two: const defines a constant large lowercase sensitive, while define can specify case sensitivity by a third argument (true for case insensitivity). Defines a constant at run time. Define (' TXE ', 100,true);
Usage Three: const cannot define a constant in a conditional statement, and the Define function can. if ($a >10) {define (' LE ', ' Hello ');}
PHP----------the constants defined by the const and define () define the difference between constants?