I think we'd need some examples of what you mean to do. My first move would be : why do you need to do such strange things? Can't you simple run a perl script from a php script, or run a php script from a perl script, or rewrite whatever is written in one language in the other one?