- const can be used in a class, but define cannot.
- const defines class member variables in a class. Once defined, it cannot be changed. define can only define global constants, not class member variables
- const can only be named with ordinary constants, define can use expressions
- const can only receive static variables, define can receive any expression
- const is case-sensitive when defining constants Sensitive, define can specify whether it is case sensitive through the third parameter (true means case is not sensitive)
- const cannot define variables in conditional statements
').addClass('pre- numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i ').text(i));
};
$numbering.fadeIn(1700);
});
});
The above has introduced the difference between PHP defined constants, const and define, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.