$file = find_file('includes', 'functions.php'); if ($file !== false) { require_once $file; }
$library = find_file('lib', 'PDO.php'); if ($library !== false) { require_once $library; } class Database { ... }In this example, find_file searches for the file "PDO.php" inside the "lib" directory. If it finds the file, it returns the complete path to the file, which is stored in the $library variable. We then check if the library exists by comparing $library to false. If $library is not false, then we include the library using require_once statement. Finally, we define our "Database" class. From the examples, it is evident that the find_file function is a core function in PHP and does not belong to any package library.