xref: /PHP-8.4/ext/opcache/tests/jit/gh12723-B.phpt (revision 126a255d)
1--TEST--
2GH-12723: JIT emits "Attempt to assign property of non-object" warning at the same time as Error is being thrown
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6--FILE--
7<?php
8
9$container = new stdClass();
10
11try {
12    $container[new stdClass()] .= 'append';
13} catch (\Throwable $e) {
14    echo $e->getMessage(), "\n";
15}
16
17?>
18--EXPECT--
19Cannot use object of type stdClass as array
20