xref: /php-src/ext/pcntl/tests/bug81577_2.phpt (revision 271cbe52)
1--TEST--
2Bug #81577: (Exceptions in interrupt handlers: ADD_ARRAY_ELEMENT)
3--EXTENSIONS--
4pcntl
5posix
6--FILE--
7<?php
8pcntl_async_signals(true);
9pcntl_signal(SIGTERM, function ($signo) {});
10try {
11	$a = [1, posix_kill(posix_getpid(), SIGTERM), 2];
12} catch (Throwable $ex) {
13	echo get_class($ex) , " : " , $ex->getMessage() , "\n";
14}
15var_dump($a);
16?>
17--EXPECT--
18array(3) {
19  [0]=>
20  int(1)
21  [1]=>
22  bool(true)
23  [2]=>
24  int(2)
25}
26