Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

unserialize() Error Report

unserialize() parses a string into a PHP data structure: array, int, object, etc. When the parser encounters an error, it emits a specific message, and returns null. This error used to be a notice and it now a warning.

PHP code

<?php

unserialize("an invalid string");

?>

Before

PHP Notice:  unserialize(): Error at offset 0 of 17 bytes

Notice: unserialize(): Error at offset 0 of 17 bytes

After

PHP Warning:  unserialize(): Error at offset 0 of 17 bytes

Warning: unserialize(): Error at offset 0 of 17 bytes

PHP version change

This behavior changed in 8.3.

Error Messages

Extension

© 2023-2026, Damien Seguy - Exakat