How to expose objects/functions written in a different language?
===

I'm writing an application in ruby and would like to access some legacy code written in another language (php). Unfortunately this legacy code does not have an HTTP API, but it is living on the same file system. I had the idea that maybe instead of building an API, or rewriting all of the code in ruby, there may be some clever way I can expose these PHP functions so ruby can access them. Do you have an idea or approach I can use to accomplish this?