i'm running an autoloader on my php application but it's returning a white screen with "Class 'FFI\Exception' not found" written in it.
<?php
spl_autoload_register(function ($class){
$class_file = str_replace("\\", "/", $class) .".php";
if(file_exists($class_file)) require_once $class_file;
});
?>
Class "FFI\Exception" not found
PHP 8.1.12 (cli) (built: Oct 25 2022 18:20:48) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
In the beggining it was looking for a file "FFI\Exception.php". I added the file_exists as a solution, but now i'm here and i have no idea what to do.