In the CLI mode, is it safe and portable to rely on getenv('_') for finding out which php interpreter executable is running the current php script? I don’t see it documented anywhere on php.net
In the CLI mode, is it safe and portable to rely on getenv(‘_’) for
Share
constant of
PHP_BINDIRshould be more reliable(I might be wrong)
A quick test I did show
getenv("_");in fastcgi ishttpd(no problem on CLI)If you have PHP 5.4, then