Magento doesn't work with AST patch.

500 response on home page, no crash.

Other applications I tested seem to work.

Thanks. Dmitry.


On Mon, Aug 18, 2014 at 11:32 AM, Dmitry Stogov <dmi...@zend.com> wrote:

> Hi Nikita,
>
> I think RFC misses few important notes about behavior changes:
>
> 1) The behavior of $a->$b[$c] is changed. PHP apps that used such syntax
> have to be changed into $a->{$b[$c]}.
>
> 2) The evaluation order of left and right parts of assignment is changed.
> $a[$i++] = $a[$i++]; It wasn't guaranteed before, but it may break some
> code anyway.
>
> 3) $a=[1,2]; list($a,$b) = $a; won't work in the same way as before
>
> 4) Usage of undefined constants now leads to fatal errors? (see
> Zend/tests/use_const/no_global_fallback.php)
>
> 5) The patch also enables expressions on constant arrays e.g.
> isset(arra(1,2,3)[$x]);
>
> Personally, I would prefer to separate syntax and behavior changes from
> the AST patch itself or at least don't miss such changes, because they must
> be very significant from users point of view.
>
> Also some implementation related notes:
>
> - Changes to Zend/tests/bug43450.phpt are unrelated to AST. It's just a
> bad test that may be fixed separately.
>
> - I didn't get why you deleted Zend/tests/errmsg_014.php
>
> - ZEND_INIT_FCALL_BY_NAME handler shouldn't check if constant operand is
> a string. Compiler must not provide non-string constant operand. (All the
> changes to ZEND_INIT_FCALL_BY_NAME need to be verified more careful)
>
> - The same in ext/opcache/Optimizer/optimize_func_calls.c, but it's not
> critical here.
>
> - I think you don't need IS_CONST operand for ZEND_ISSET_ISEMPTY_PROP_OBJ
> handler.
>
> - Can OPcahce always keep AST in shared memory and don't copy it into
> process memory on each request? (ext/opcache/zend_accelerator_util_funcs.c)
>
>
> Thanks. Dmitry.
>
>
> On Thu, Jul 31, 2014 at 10:11 PM, Nikita Popov <nikita....@gmail.com>
> wrote:
>
>> Hi internals!
>>
>> I've created a draft RFC and implementation for the introduction of an
>> Abstract Syntax Tree (AST) as an intermediate structure in our compilation
>> process:
>>
>>      https://wiki.php.net/rfc/abstract_syntax_tree
>>
>> The RFC outlines why an AST is beneficial, how it impacts performance and
>> memory usage of the compile process and what changes to syntax or behavior
>> it introduces.
>>
>> Furthermore the RFC contains an outline of how the current implementation
>> works and what APIs it provides. This section is just an overview and I
>> hope to extend it in the future.
>>
>> Note: I'm on vacation as of tomorrow and wanted to put this up to
>> discussion beforehand. I won't be able to implement any feedback while I'm
>> away, but can of course answer questions :)
>>
>> Thanks,
>> Nikita
>>
>
>

Reply via email to