Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The part that casually drops "PHP as a config language" is where this jumped the shark for me. I guess this isn't the worst practice I've seen in PHP, but it's definitely a notable one.


the author specifically mentions that this is in the context of a php application.

and in that context, it is perfectly reasonable, I think.

what issues do you have with the idea exactly?


I guess it depends on what the use case is for configuration, but I'm envisioning times you want to allow for user/developer configurability of your program, or an installation being able to write out values that your program can use in its execution. Do you really want full programming language tools in your configuration level? Do you want an installation routine writing out a php script, or should it just serialize a config object to json / yaml?


I don't really have a problem with caching application writable config as something like serialized json or something like that, but I really dislike composer's configuration file format.


hmm, I think maybe we had different things in our minds regarding what a config script is.

I certainly don't think that the web server should be writing out executable php scripts, if that is what you are asking?

OTOH, I have seen many examples of php configuration files done by simply setting values in an array, looking up other values from other places and so forth - i.e., an executable configuration file written in php.

I think it is a bit of a jump though to assume that the author was suggesting that the web server be able to write executable php files?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: