PHP 7.2.0 Beta 1 Released

Voting

Please answer this simple SPAM challenge: six minus four?
(Example: nine)

The Note You're Voting On

Kodeart
5 years ago
Check directly without calling functions:
<?php
if (PHP_SAPI === 'cli')
{
  
// ...
}
?>

You can define a constant to use it elsewhere
<?php
define
('ISCLI', PHP_SAPI === 'cli');
?>

<< Back to user notes page

To Top