nonyck
nonyck

Reputation: 31

Use Ruby in PHP programs

I saw a lot of interesting libraries in Ruby that don't exist for PHP or its equivalents, so I want know if there is a library interpreter or something that can use RUBY code inside PHP programs to call methods and pass variables.

thx

Upvotes: 2

Views: 838

Answers (2)

DigitalRoss
DigitalRoss

Reputation: 146281

You could run a Ruby daemon or background worker of some kind and connect it with something like RabbitMQ.

But Matchu's suggestion of a script should be good enough. Ruby starts quickly. A good server can start Ruby from scratch and run a trivial Ruby script almost 500 times / second / core. Even a bad server can do 50 / second.

Upvotes: 0

Matchu
Matchu

Reputation: 85862

There is no way that I know of to, say, write a PHP wrapper for a Ruby class.

You can, however, write a standalone Ruby script and then call it with a system command.

Upvotes: 2

Related Questions