Skip to content

Compiled constant expr code must still emit all op execute hooks #9895

@mvorisek

Description

@mvorisek

Description

related with sebastianbergmann/php-code-coverage#889

if code can be run on compile time (constant expr), all hooks, used for ex. by coverage libs like xdebug, must still be called in the same order as if the code was not optimized on compile time

examples:

code with always constant expr:

        $v2
            =
            (bool)
            1
        ;

the cast operation can be always evaluated/optimized on compile time, but cast operation hook must be always emit

code with sometimes constant expr:

        $v3
            =
            (bool)
            AType::OPT
        ;

same as the first example when AType class was loaded before this example was included/compiled

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions