Forum Moderators: coopster
- constants
- variables
- arrays
- classes
In that order. From a stability standpoint, constants are probably also the best as you'll get notices (with E_ALL) any time you try to redefine them, so you're less likely to have collisions. Variables are easiest to create and type. If you use simple variables, choose a naming convention that will make it clear that it's a config variable
$_ImAConfigVar
$im_not
For example.
Realistically, the performance differences will likely be very, very small and I would use what makes the most sense according to the logic of the script.
In other words, if using an array allows you to significantly simplify the script elsewhere, that will give you a greater performance gain.