I want to run a PHP cli program from within PHP cli. On some machines where this will run, both php4 and php5 are installed. If I run the outer program as
I know this question is a bit old, but it came up while looking for a shorter way of doing this.
Unfortunately I can't find a shorter way, but this works pretty well and is multi OS/PHP version compatible.
$lookIn could probably be extended to include more common locations.
https://gist.github.com/cjsewell/39b60065ae2af677ceb1
Hope it helps someone