Which is faster? Constants, Variables or Variable Arrays

前端 未结 6 1003
清酒与你
清酒与你 2020-12-03 13:38

My current web application uses about 30 or so Contants (DEFINE()). I am reading things that variables are quicker. Provided that there is a naming convention to avoid varia

6条回答
  •  眼角桃花
    2020-12-03 14:10

    The difference would be really small (micro optimizations). You would better encapsulate some of your constants in classes so you can access them by Classname::CONSTANT to not pollute the global namespace of your application.

提交回复
热议问题