Jump to content

Constants


Echilon

Recommended Posts

I have several hundred constants which define strings used to translate my PHP script into different languages. I'm wondering which would be the best way to include them: define them all or split them into a function, which accepts a parameter. On every page, pass a parameter to the function which will load just the constants needed for that page. Would the overhead to store and call the function actually end up making the script slower? Which would be quicker/require less resources?

Link to comment
https://forums.phpfreaks.com/topic/39925-constants/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.