doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Example page in manual for Error Handling uses old/deprecated code

Open KhaledChebat opened this issue 1 year ago • 1 comments

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+

KhaledChebat avatar Jul 14 '24 13:07 KhaledChebat

In my opinion, this doesn't look like a useful example in the PHP manual; way too complex and too specific.

cmb69 avatar Jul 23 '24 09:07 cmb69