1--TEST-- 2Type change in assign_op (use-after-free) 3--FILE-- 4<?php 5declare(strict_types=1); 6 7class A { 8 public string $foo; 9} 10 11$o = new A; 12$o->foo = "1" . str_repeat("0", 2); 13try { 14 $o->foo += 5; 15} catch (Throwable $e) { 16 echo $e->getMessage() . "\n"; 17} 18var_dump($o->foo); 19unset($o); 20?> 21--EXPECT-- 22Typed property A::$foo must be string, int used 23string(3) "100" 24