1--TEST-- 2JIT: FETCH_OBJ 006 3--INI-- 4opcache.enable=1 5opcache.enable_cli=1 6opcache.file_update_protection=0 7--FILE-- 8<?php 9class Test { 10 readonly array $prop; 11} 12 13$test = new Test; 14 15try { 16 throw new Exception; 17} catch (Exception) {} 18 19$appendProp2 = (function() { 20 $this->prop[] = 1; 21})->bindTo($test, Test::class); 22$appendProp2(); 23?> 24--EXPECTF-- 25Fatal error: Uncaught Error: Cannot indirectly modify readonly property Test::$prop in %s:%d 26Stack trace: 27#0 %s(%d): Test->{closure:%s:%d}() 28#1 {main} 29 thrown in %sfetch_obj_006.php on line 13 30