doc-en
doc-en copied to clipboard
Example page in manual for Error Handling uses old/deprecated code
The example page for Error Handling uses deprecated method wddx_serialize_value and a callback method signature that does not match the current documentation recommendation:
- Callback signature in Example Page:
function($errno, $errmsg, $filename, $linenum, $vars) - Recommended callback signature in current documentation:
handler( [int](https://www.php.net/manual/en/language.types.integer.php) $errno, [string](https://www.php.net/manual/en/language.types.string.php) $errstr, [string](https://www.php.net/manual/en/language.types.string.php) $errfile = ?, [int](https://www.php.net/manual/en/language.types.integer.php) $errline = ? ): [bool](https://www.php.net/manual/en/language.types.boolean.php)
The last parameter in example $vars maps to the old callback function parameter errcontext which has been removed in PHP8.0+
In my opinion, this doesn't look like a useful example in the PHP manual; way too complex and too specific.