Skip to content

Failed to invoke user error handler during index conversion in JIT #16396

@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
class C {
    public function __construct(
        $prop { set => $value * 2; }
    ) {}
}
$c = new C(42);
$fusion = $c;
set_error_handler(function($code, $msg) {
    echo "Err: $msg\n";
    $GLOBALS[''] = $GLOBALS['y'];
});
function x(&$s){
    $fusion[100000000000000000000] = 1;
}
x($y);
var_dump($y);
?>

Resulted in this output:

NULL

But I expected this output instead:

Err: Implicit conversion from float 1.0E+20 to int loses precision
NULL

To reproduce:

-d "opcache.enable=1" -d "opcache.enable_cli=1"

PHP Version

nightly

Operating System

ubuntu 22.04

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