Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

spl_autoload_extensions

Description

The spl_autoload_extensions of SPL for PHP registers and returns the default file extensions for spl_autoload.

Syntax

spl_autoload_extensions(
    ?string $file_extensions = null
): string

Parameters

file_extensions

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

Returns a comma delimited list of default file extensions for spl_autoload().

Examples

1 · void

<?

$return = spl_autoload_extensions();

echo $return;

?>
.inc,.php

2 · file_extensions

<?

$file_extensions = ".php,.inc";

$return = spl_autoload_extensions($file_extensions);

echo $return;

?>
.php,.inc
HomeMenu