Class Firebase\JWT\JWT not found

As per the documentation, you need to include the autoloader. E.g., in your php file: require __DIR__ . ‘/vendor/autoload.php’; But… typically your vendor folder would be at the same level than your html folder (the one where you are serving content). E.g.: – Project root — vendor — html —– index.php Then in your index.php … Read more

Autoloader for functions

There is no function auto-loader for functions. You have four realistic solutions: Wrap all functions into namespacing classes (context appropriate). So let’s say you have a function called string_get_letters. You could add that to a class called StringFunctions as a static function. So instead of calling string_get_letters(), you’d call StringFunctions::get_letters(). You would then __autoload those … Read more