note 105504 deleted from features.commandline by sobak
| From: | sobak@php.net | Date: | Thu, 01 Dec 2016 06:54:07 +0000 |
| Subject: | note 105504 deleted from features.commandline by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207821@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Instead of all these long and .. interesting .. ways to check if you're running from cli, you
could always do this:
<?php
function isCli() {
return php_sapi_name()==="cli";
}
?>