spl_autoload_extensions
Function • Params and return types changed in PHP 8.0
Register and return default file extensions for spl_autoload.
spl_autoload_extensions Function synopsis
spl_autoload_extensions(?string $file_extensions = null): string
Parameters
$file_extensions
OptionalType?stringDefault valuenull
If null, it simply returns the current list
of extensions each separated by comma. To modify the list of file
extensions, simply invoke the functions with the new list of file
extensions to use in a single string with each extensions separated
by comma.
Return value
Typestring
A comma delimited list of default file extensions for
spl_autoload.
Changes to the spl_autoload_extensions Function
PHP 8.0
- Return type added:
string - Parameter type added for parameter #1 (
$file_extensions):?string - Parameter default value added for position #1 (
$file_extensions):null
- spl_autoload_extensions($file_extensions)
+ spl_autoload_extensions(?string $file_extensions = null): string spl_autoload_extensions Function Availability
spl_autoload_extensions Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |