← All docs

php_sapi_name()

Returns the name of the server API this build runs under.

php_sapi_name()

function php_sapi_name(): string

Returns the name of the server API this build runs under.

Parameters: none.

Returns: string

Availability

  • Compiled (AOT): supported through the compiler-injected version prelude.
  • eval() (magician interpreter): not available inside eval’d code.

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how php_sapi_name is implemented in the compiler, see the internals page.