Re: com php-src: Added function opcache_compile_file() to load PHP scripts into cache without execution.: NEWS ext/opcache/ZendAccelerator.c
ext/opcache/ZendAccelerator.h ext/opcache/zend_accelerator_module.c
| From: | Dmitry Stogov | Date: | Fri, 27 Sep 2013 09:58:50 +0000 |
| Subject: | Re: com php-src: Added function opcache_compile_file() to load PHP scripts into cache without execution.: NEWS ext/opcache/ZendAccelerator.c ext/opcache/ZendAccelerator.h ext/opcache/zend_accelerator_module.c |
||
| References: | 1 2 3 4 5 6 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-73300@lists.php.net to get a copy of this message | ||
On Fri, Sep 27, 2013 at 1:46 PM, Antony Dovgal <tony@daylessday.org> wrote:
> On 2013-09-27 12:48, Dmitry Stogov wrote:
>
>> Hi Antony,
>>
>> I'm not sure if switching from zend_error() to php_error_docref() would
>> improve usability.
>>
>
> Well, IIRC the only difference is that it generates nice links to the docs
> and you're about to have those.
>
> Also I'm not sure all the cases when E_ERROR is used are reasonable,
> shouldn't they be something else?
>
> ext/opcache/zend_accelerator_**util_funcs.c:481:
> zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class
> %s, function %s. Please call Zend Support", ce->name,
> new_entry->function_name);
> ext/opcache/zend_accelerator_**util_funcs.c:490:
> zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class
> %s, function %s. Please call Zend Support", ce->name,
> new_entry->function_name);
> ext/opcache/zend_accelerator_**util_funcs.c:592:
> zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class
> %s, property %s. Please call Zend Support", ce->name, prop_info->name);
> ext/opcache/zend_accelerator_**util_funcs.c:624:
> zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class
> %s. Please call Zend Support", ce->name); \
> ext/opcache/zend_accelerator_**util_funcs.c:713:
> zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class
> %s. Please call Zend Support", ce->name);
> ext/opcache/zend_accelerator_**util_funcs.c:874:
> zend_error(E_ERROR, "Cannot redeclare %s() (previously declared in %s:%d)",
> ext/opcache/zend_accelerator_**util_funcs.c:879:
> zend_error(E_ERROR, "Cannot redeclare %s()", function1->common.function_*
> *name);
> ext/opcache/zend_accelerator_**util_funcs.c:897:
> zend_error(E_ERROR, "Cannot redeclare class %s", (*pce1)->name);
>
> E_RECOVERABLE_ERROR maybe?
No way. How are you going to "recover" from such errors?
The standard PHP compiler throws E_ERROR for last 3 cases, anyway.
Thanks. Dmitry.