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     protected function addToDebugBar($data, $formHandle)

    {

        if (! function_exists('debugbar') || ! class_exists(ConfigCollector::class)) {

            return;

        }
<?php     return Path::tidy(__DIR__.'/../'.$path);

}



if (! function_exists('debugbar')) {

    function debugbar()

    {

        return app()->bound(LaravelDebugbar::class) ? app(LaravelDebugbar::class) : optional();
<?php     public function dd($value)

    {

        function_exists('ddd') ? ddd($value) : dd($value);

    }
<?php     public function ray($value)

    {

        throw_unless(function_exists('ray'), new \Exception('Ray is not installed. Run `composer require spatie/laravel-ray --dev`'));



        ray($value);
<?php     {

        $value = $this->context->all();



        function_exists('ddd') ? ddd($value) : dd($value);

    }

}