Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.

Variables Configuration Options
NameDefaultChangeableChangelog
unserialize_callback_funcnullINI_ALL 
unserialize_max_depth"4096"INI_ALLAvailable as of PHP 7.4.0.
For further details and definitions of the INI_* modes, see the Where a configuration setting may be set.

Here's a short explanation of the configuration directives.

unserialize_callback_funcstring

The callback specified is called when unserialize() attempts to use an undefined class. A warning appears if the specified callback function is not defined, or if the callback function fails to define the missing class.

See also unserialize() and Autoloading Classes.

unserialize_max_depthint

The maximum depth of structures permitted during unserialization when using unserialize(), and is intended to prevent stack overflows. This can be disabled by setting unserialize_max_depth=0.

See also unserialize() and Autoloading Classes.

To Top