Another question for you. What do you for configuration management? Ini files? PHP Code? Yml? Do you have it as part of your deployment process? Hand-code in production?
And, do you like your configuration management mechanism?
Creating a config.php file where you set variable or constant values is pretty much the standard for PHP applications. For .NET applications, there's App.config or Web.config.
Depends. For small to medium sized projects I use a php array for db settings, and a generic config class for both application and user settings.
The two big projects i'm working with uses a pretty large ini file for app settings, cached in shared memory. User settings in db, cached with memcache.
Well, I uses the application.ini file for general configuration but for convenience reason, I use too some plugin resource classes that allow me to have great control over the configuration.
ini for hard config (db connections etc), there are some usecases for dynamic config which is stored in db. And there is another thing to config management: deployment of the config. DB stored cofnig is obsiusly shared among all the nodes and the ini file is deployed via separete svn repo and some custom made machinery. So any change to the config (turning on and off bits of cache, some default values like page size for pagination, mail config etc) is supervised and trackable and deployed simultanously on all nodes.
I think it definitely worth to use PHP files (in worst case you var_export your ini file in deploying time) if performance counts. PHP files can be easily bytecode cached with APC (or eAccelerator and company) so reading and processing is much quicker.
"Configuration Management" means different things to different people.
To some people it means handling the configuration of your application at run time.
To others it means source control.
I usually use PHP code, just a config.php file with a $CONFIG array that has all the configuration, sometimes I use ini files, but now I am starting to use json files. Maybe I will need to do some benchmarking in fetching info, from these 3 methods.
But this are all from my side projects/jobs, I haven't got the chance to use PHP in a company job or at least in a biiig project.
Am using ini files now, but have used PHP code, and Spring style xml files, though each have their benefits and failure points.
I'm using .ini files, just started a few months ago. Before that my configuration options have been hard coded in PHP code, very bad idea :-) Ini files seems good and nice to work.