function_exists

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return true if the given function has been defined
<?php function_exists(string $function): bool
<?php     public function __construct()

    {

        if (! function_exists('pcntl_fork')) {

            throw new Exception("Cannot create process forks: PCNTL is not supported on this system.");

        }

    }