php-8.0.30-src/ext/opcache/tests/jit/assign_dim_004.phpt

27 lines
536 B
PHP

--TEST--
JIT ASSIGN_DIM: 004
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
class Test implements ArrayAccess {
function offsetExists($x): bool {}
function offsetGet($x): mixed {}
function offsetSet($x, $y): void {
echo "offsetSet($x, $y)\n";
}
function offsetUnset($x): void {}
}
function test() {
$obj = new Test;
$obj[$undef] = 1;
}
test();
?>
--EXPECTF--
Warning: Undefined variable $undef in %s on line %d
offsetSet(, 1)