php_sapi_name

string php_sapi_name(void) 

Obtains the SAPI interface type.

Returns:

Current PHP SAPI interface

Description:

Returns the name of the interface between PHP and the web server on which PHP is running. If PHP is running as a CGI, this function returns the string 'cgi'.

Version:

Existing since version 4.0.1

Example:

Display current PHP SAPI interface
echo php_sapi_name; 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.