Skip to content

Commit 44add3c

Browse files
Girgiasderickr
authored andcommitted
Add secondary test that registers a trampoline as a shutdown function
1 parent b489e0f commit 44add3c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Zend/tests/gh10072-2.phpt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
GH-10072 (PHP crashes when execute_ex is overridden and a trampoline is used from internal code during shutdown)
3+
--EXTENSIONS--
4+
zend_test
5+
--INI--
6+
zend_test.replace_zend_execute_ex=1
7+
opcache.jit=disable
8+
--FILE--
9+
<?php
10+
11+
class TrampolineTest {
12+
public function __call(string $name, array $arguments) {
13+
echo 'Trampoline for ', $name, PHP_EOL;
14+
}
15+
}
16+
17+
register_shutdown_function([new TrampolineTest(), 'shutdown']);
18+
?>
19+
--EXPECT--
20+
Trampoline for shutdown

0 commit comments

Comments
 (0)