I was having a conversation on IRC and I wanted to demo some code generation I did this afternoon.
I used this PHP to generate this BASH code.
And I used this PHP to generate this PHP code.
I think PHP is a good choice for code generation.
I was having a conversation on IRC and I wanted to demo some code generation I did this afternoon.
I used this PHP to generate this BASH code.
And I used this PHP to generate this PHP code.
I think PHP is a good choice for code generation.
Here is another PHP thing I need to think clearly about from time to time:
var_dump( [ 'a' => 1 ] + [ 'a' => 2, 'b' => 2 ] );
Returns:
array(2) { 'a' => int(1) 'b' => int(2) }