Flexible PHP code generation tool