file_exists

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks whether a file or directory exists
<?php file_exists(string $filename): bool
<?php $configFile  = null;



foreach ($files as $file) {

    if (file_exists($file)) {

        $loader = require $file;



        break;
<?php foreach ($directories as $directory) {

    $configFile = $directory . DIRECTORY_SEPARATOR . 'cli-config.php';



    if (file_exists($configFile)) {

        break;

    }

}
<?php     }

}



if (! file_exists($configFile)) {

    ConsoleRunner::printCliConfigTemplate();



    exit(1);
<?php     public function dropDatabase($database)

    {

        if (! file_exists($database)) {

            return;

        }
<?php {

    protected function tearDown(): void

    {

        if (file_exists('/tmp/test_nesting.sqlite')) {

            unlink('/tmp/test_nesting.sqlite');

        }
<?php         $filename = sprintf('%s/%s', sys_get_temp_dir(), 'doctrine_failed_connection_' . $mode . '.db');



        if (file_exists($filename)) {

            $this->cleanupReadOnlyFile($filename);

        }