1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
Ilija Tovilo faa4c7f9e6 Fix flaky gh19984.phpt test
When the parent finishes before the child, we may miss some output from the
child and have the test fail.
2025-10-03 22:25:18 +02:00

26 lines
594 B
PHP

--TEST--
GH-19984: Double-free of EG(errors)/persistent_script->warnings on persist of already persisted file
--EXTENSIONS--
opcache
pcntl
--INI--
opcache.enable_cli=1
opcache.record_warnings=1
--SKIPIF--
<?php
if (!function_exists('pcntl_fork')) die('skip pcntl_fork() not available');
?>
--FILE--
<?php
$pid = pcntl_fork();
require __DIR__ . '/warning_replay.inc';
if ($pid) {
// Wait for child to output its error message.
pcntl_waitpid($pid, $status);
}
?>
--EXPECTF--
Warning: Unsupported declare 'unknown' in %s on line %d
Warning: Unsupported declare 'unknown' in %s on line %d