xref: /PHP-8.3/ext/opcache/tests/jit/bug80634.phpt (revision 21fe7275)
1--TEST--
2Bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9opcache.jit=function
10opcache.preload={PWD}/preload_bug80634.inc
11--EXTENSIONS--
12opcache
13--SKIPIF--
14<?php
15if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
16?>
17--FILE--
18<?php
19$v = new SomeClass(5);
20?>
21--EXPECTF--
22Fatal error: Uncaught Error: Cannot modify readonly property DatePeriod::$current in %spreload_bug80634.inc:7
23Stack trace:
24#0 %sbug80634.php(2): SomeClass->__construct(5)
25#1 {main}
26  thrown in %spreload_bug80634.inc on line 7
27