PS:

Github search result:
https://github.com/search?l=c&q=php_error_docref&ref=searchresults&type=Code&utf8=%E2%9C%93


It seems that no one need the docref at all.

On 11 February 2015 at 16:07, reeze <re...@php.net> wrote:

> Hi all,
>      There  are a lot of code use  php_error_docref() macro, the first
> parameter
> mostly is NULL, before PHP7, it looks like:
>
> *php_error_docref(NULL TSRML, E_WARNING, "recursion detected");*
> in PHP7
> *php_error_docref(NULL, E_WARNING, "recursion detected");*
> looks better, but the first parameter look dumb.
>
> I did a simple statics, there are:
>
> Null docref: 2530
> Not Null docref: 51
>
> I searched on Github, it seems that almost all of the extension use NULL
> docref.
>
> So I propose add a new macro, like:  php_error_error_docref_ex(E_WARNING,
> "xxx").
> this could make code looks better and  the extension maintainer's easier.
>
> Another option would be just update the php_error_docref() macro to remove
> the docref parameter, default to NULL but not add a new macro.
>
>
> What do you think about it?
>
> [1] https://github.com/php/php-src/pull/1075
>
> --
> Reeze Xia
> http://reeze.cn
>



-- 
Reeze Xia
http://reeze.cn

Reply via email to