diff options
Diffstat (limited to 'tests/func/005a.phpt')
-rw-r--r-- | tests/func/005a.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/func/005a.phpt b/tests/func/005a.phpt new file mode 100644 index 0000000..3c2bcb1 --- /dev/null +++ b/tests/func/005a.phpt @@ -0,0 +1,32 @@ +--TEST-- +Testing register_shutdown_function() with timeout. (Bug: #21513) +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +?> +--FILE-- +<?php + +ini_set('display_errors', 0); + +echo "Start\n"; + +function boo() +{ + echo "Shutdown\n"; +} + +register_shutdown_function("boo"); + +/* not necessary, just to show the error sooner */ +set_time_limit(1); + +/* infinite loop to simulate long processing */ +for (;;) {} + +echo "End\n"; + +?> +--EXPECT-- +Start +Shutdown |