[PR][php-src][#1018][master] - Implemented FR: Allow error_handler callback parameters to be passed by reference
| From: | noreply@php.net | Date: | Sat, 28 Feb 2015 01:35:56 +0000 |
| Subject: | [PR][php-src][#1018][master] - Implemented FR: Allow error_handler callback parameters to be passed by reference | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-2514@lists.php.net to get a copy of this message | ||
You can view the Pull Request on github:
https://github.com/php/php-src/pull/1018
Warning: according to github, the Pull Request cannot be merged without manual conflict resolution!
Pull Request Description:
> Dicussion: http://marc.info/?t=142181539200002&r=1&w=2
Implemented FR: Enable error_handler callback parameters to be passed by reference.
for example, we can now have the ability to modify the errmsg.
```php
<?php
set_error_handler(function(&$code, &$errmsg, &$file, &$lineno) {
$code = E_WARNING;
$errmsg = "[Prefix] - {$errmsg} - [Suffix]" . $_SERVER['URI'];
$file = "a-new-file.ext.php";
$lineno = 999;
return false;
});
```