1--TEST-- 2Async signals in zend_call_function 3--SKIPIF-- 4<?php 5if (!extension_loaded("pcntl")) print "skip"; 6if (getenv("SKIP_SLOW_TESTS")) print "skip slow test"; 7?> 8--FILE-- 9<?php 10 11pcntl_async_signals(1); 12pcntl_signal(SIGALRM, function($signo) { 13 throw new Exception("Alarm!"); 14}); 15 16pcntl_alarm(1); 17try { 18 array_map( 19 'time_nanosleep', 20 array_fill(0, 360, 1), 21 array_fill(0, 360, 0) 22 ); 23} catch (Exception $e) { 24 echo $e->getMessage(), "\n"; 25} 26 27?> 28--EXPECT-- 29Alarm! 30