xref: /php-src/Zend/tests/bug78396.phpt (revision f8d79582)
1--TEST--
2Bug #78396: Second file_put_contents in Shutdown hangs script
3--FILE--
4<?php
5
6register_shutdown_function(function () {
7    file_put_contents(__DIR__ . '/bug78396.txt', '1', FILE_APPEND | LOCK_EX);
8    file_put_contents(__DIR__ . '/bug78396.txt', '2', FILE_APPEND | LOCK_EX);
9    echo "Done\n";
10});
11
12?>
13--CLEAN--
14<?php
15unlink(__DIR__ . '/bug78396.txt');
16?>
17--EXPECT--
18Done
19