Only for the speed problem, as for the usage for the time being, see online Some people say that const belongs to the structure of grammar, the speed will be higher than define function several times, I need a professional argument, is it true? Now that const can be used outside of the class, is it a priority when you define constants?
Reply content:
Only for the speed problem, as for the usage for the time being, see online Some people say that const belongs to the structure of grammar, the speed will be higher than define function several times, I need a professional argument, is it true? Now that const can be used outside of the class, is it a priority when you define constants?
For speed comparisons, I suggest that you can write a few lines of code yourself under test, much better than asking here.
1. Expressions can now be used in 2 different ways;
2.const can define arrays, define can only define scalar
Even if the grammatical structure is faster than a function call, then the const and define () are trivial differences, rather than trivial performance trivial, it is better to optimize the following table structure and SQL statements come true.