if (file_exists('config.php')) { // Config file exists } else { // Config file does not exist }
$config = [ 'db_host' => 'localhost', 'db_name' => 'mydatabase', 'db_user' => 'myusername', 'db_pass' => 'mypassword' ]; if (isset($config['db_name'])) { // db_name configuration setting exists } else { // db_name configuration setting does not exist }The `Config` exists function is not a part of any PHP package or library. It is a built-in PHP function that is available in all PHP installations.