No, it is not installed in the CLI . Therefore, not always.
$ php -r "echo $_SERVER['SERVER_ADDR'];"
(no conclusion)
If you have errors registered or reported (based on your PHP.ini settings), you will also receive this message:
PHP Notice: Undefined index: SERVER_ADDR in Command line code on line 1
hakre source share