Generating PHP with Ruby

Ran into an interesting article recently on PHP Web Site Generation using Ruby, over at (the site runs a PHP section here). The article makes a good starting point for exploring what works and what doesn’t.

Think PHP is underestimated where code generation is concerned, given how easy it is to generate and dynamically execute code e.g.;

// Some code
$code = '
echo "Hello World!";

// Write code to file
file_put_contents('generated.php',$code); # PHP5 function!

// Include the generated code for execution
include 'generated.php';

Also interesting that Ruby (a dynamic language in more or less the same category as Python and Perl) was used as the generator.


Category: programming Time: 2004-06-25 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.193 (s). 12 q(s)