1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Files
archived-php-src/ext/pcre/tests/bug78272.phpt
T
Nikita Popov 85b001974a Remove unstable test output
This may be printed in a different order, and we don't care about
it anyway.
2019-09-18 16:36:29 +02:00

32 lines
539 B
PHP

--TEST--
Bug #78272: calling preg_match() before pcntl_fork() will freeze child process
--SKIPIF--
<?php
if (!extension_loaded('pcntl')) die("skip pcntl extension required");
?>
--FILE--
<?php
preg_match('/abc/', 'abcde', $r);
$pid = pcntl_fork();
if ($pid === 0) {
print "Child start\n";
preg_match('/abc/', 'abcde', $r);
print_r($r);
print "End child\n";
exit(0);
} else {
pcntl_waitpid($pid, $status);
print "End Main\n";
exit(0);
}
?>
--EXPECT--
Child start
Array
(
[0] => abc
)
End child
End Main