Re: CLI Constant
| From: | Timm Friebe | Date: | Thu, 30 Sep 2004 21:59:08 +0000 |
| Subject: | Re: CLI Constant | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13091@lists.php.net to get a copy of this message | ||
On Thu, 2004-09-30 at 23:10, Jason Garber wrote:
> Hello internals,
[...]
> If there is no better way, perhaps we could add constant called
> (SAPI_TYPE = 'CLI') or something like that to the language to
> facilitate this?
$ php -r 'var_dump(PHP_SAPI);'
string(3) "cli"
get_defined_constants() is your friend:)
- Timm