PHP configuration files (XML versus YAML and PHP files)

Im doing a little experiment. In the old days, most people saved configuration files in a php file as a bunch of constants or a class with the loooot attribute. Now we see projects like symfony using yaml or something else. My question is:

If you can choose one of three ways to store your configuration files: xml, yaml or php files, which would you choose? Most important: why?

thanks for the help

+3
source share
1 answer

For me, it depends on who will touch this configuration.

If they are developers, then PHP files are best, since they do not require additional analysis.

(, sysadmins), : , XML YAML, PHP-, - ( , ). PHP ( , - , , !).

... , -, . , ( db).

+8

Source: https://habr.com/ru/post/1772988/


All Articles