1--TEST-- 2JIT: FETCH_OBJ 003 3--INI-- 4opcache.enable=1 5opcache.enable_cli=1 6opcache.file_update_protection=0 7--EXTENSIONS-- 8opcache 9--FILE-- 10<?php 11#[ALlowDynamicProperties] 12class C { 13 var $a = 0; 14} 15function foo() { 16 $x = new C; 17 $x->a = 1; 18 unset($x->a); 19 $x->a += 2; 20 var_dump($x); 21} 22function bar() { 23 $x = new C; 24 $x->a = 1; 25 $x->b = 2; 26 unset($x->a); 27 $x->a += 2; 28 var_dump($x); 29} 30foo(); 31bar(); 32?> 33--EXPECTF-- 34Warning: Undefined property: C::$a in %s on line %d 35object(C)#1 (1) { 36 ["a"]=> 37 int(2) 38} 39 40Warning: Undefined property: C::$a in %s on line %d 41object(C)#1 (2) { 42 ["a"]=> 43 int(2) 44 ["b"]=> 45 int(2) 46} 47