Oihana PHP

isInteractive.php

Table of Contents

Functions

isInteractive()  : bool
Checks if the script is running in an interactive CLI (php -a or terminal input).

Functions

isInteractive()

Checks if the script is running in an interactive CLI (php -a or terminal input).

isInteractive() : bool
Tags
example
use function oihana\core\env\isInteractive;

if ( isInteractive() )
{
   echo "Interactive cli mode\n";
}
author

Marc Alcaraz

since
1.0.0
Return values
bool

true if interactive CLI, false otherwise


        
On this page

Search results