Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby-like language that compiles to PHP
PHP C# Ruby
branch: master


Fructose is a language that compiles to PHP. Fructose's syntax is borrowed from that of Ruby's, with changes and standard library differences to make this project feasible under PHP.

It is composed of two parts - Fructose itself, which is written in C#, and libfructose - a support library written in PHP and included by every file Fructose outputs. libfructose is designed to provide a subset of the Ruby standard library to Fructose programs.

libfructose Status

Enumerable Done
Array Done
String Done
Symbol Done
Number Done
TrueClass/FalseClass Done
NilClass Done
Object (including Kernel) Done
Hash Done
Exceptions/Errors Done
Regexp Subset Done
Proc Done
Random Done
Range Done
File Done


Fructose is written in C# and requires the .NET 4.0 framework to run. Fructose does work and is supported under Mono, but you will need to find yourself a copy of Microsoft.Scripting.dll and Microsoft.Dynamic.dll to get it to compile. Fructose also requires the presence of IronRuby to compile and run.


The Fructose compiler is licensed under the New BSD license. libfructose is licensed under the zlib license.

Something went wrong with that request. Please try again.