PHP code generation