News for hackers. Stuff that matters.
Re:YAML: probably not so great after all (2017) by dotancohen on Thursday June 21, 2018 @03:25AM (#17362881)
> There's no language that I'm aware of that can natively generate PHP syntax.

Actually, I've had to use PHP to output a PHP configuration array for a project that required config in PHP.

`var_export($foo)` will output valid PHP code for creating the array $foo. In my case I was doing horrible things to create the array in my pseudo-makefile, then using `var_export()` to output the result. Note that you can run php from the Bash CLI with the `-r` flag, which helps.

There are no comments on this comment yet.