There is a benchmark to measure the performance between parse_ini_file and include common?
I need to work with a language pack and I am in doubt whether I use .ini or .php
Could someone tell me what the positives and negatives of each way?
Thank you
It depends on how edits those files; are you considering .ini format to help translators? If so, that’s an important design decision.
If who edits the files is not important, the next up is performance. In this case,
parse_ini_filewill always be slower; you can’t beatinclude(), because it can be highly optimized (using opcode caches, thinkAPC).Even if the performance were the same, the .ini is limited in terms of expressiveness; a .php data structure can describe more, can use objects, etc.