From: Jeff Wood Date: 2006-10-02T07:05:48+09:00 Subject: Re: Can PHP be used in Ruby? Actually, you can use pretty much anything you want ... I tend to start up an external process running whatever ( perl, python, php, java, C++, whatever ) ... and have it run a XMLRPC engine ... Then I just send code that means something to that engine ... So, with everything but C++ you can just do evals on the xmlrpc side ... ( in java I recommend beanshell ) ... let it do what it needs to do ... and return a string or integer or whatever ... ( usually if I need a complex data structure I pass YAML back and forth since there are YAML engines for most any programming language you could want to use ) ... Anyways ... that's how I go about it ... it definately lets you use Ruby as glue or as your controller ... ... hope that helps. jd On Sun, 01 Oct 2006 14:22:01 -0700, darren kirby wrote: > quoth the David Vallner: >> darren kirby wrote: >> > quoth the James Britt: >> >> terrywu1526@gmail.com wrote: >> >>> Can I run some PHP code in Ruby, and access the variables? >> >> >> >> No. >> > >> > Not strictly no: >> > >> > irb(main):001:0> foo = `php foo.php` >> > => "some value\n" >> >> That's not quite running PHP code in ruby, is it? >> >> David Vallner > > in/from potayto/potahto > > Don't get me wrong, I am certainly not endorsing that sort of thing but > it is > a way to get a php variable's value into Ruby... > > -d