samedi 7 février 2015

Differences between config formats?


I'm trying to figure out what's the most appropriate configuration format for my web application, which is written in PHP.


The ones that I'm aware of:




  • json


    very portable, but I can't add comments and I don't like the fact that keys require double quotes, and that I can't leave ending comma on the last element from an array




  • ini


    it's pretty but it doesn't support nested arrays :(




  • .php




  • It's the most flexible, I can put anything in there, comments, constants, arrays etc. But it's not pretty and noob friendly.




  • xml


    it gets very big, and not so noob friendly either




Are there any others? Which one would be the best choice for a php app?





Aucun commentaire:

Enregistrer un commentaire