1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Files
archived-php-src/ext/opcache/tests/warning_replay.phpt
T
Nikita Popov 0a74da385d Add support for replaying warnings in opcache
If opcache.record_warnings is enabled, opcache will record
compilation warnings and replay them when the file is included
again. The primary use case I have in mind for this is automated
testing of the opcache file cache.

This resolves bug #76535.
2020-05-20 11:20:21 +02:00

16 lines
376 B
PHP

--TEST--
Opcache should replay compilation warnings if opcache.record_warnings=1
--INI--
opcache.record_warnings=1
--FILE--
<?php
require __DIR__ . '/warning_replay.inc';
require __DIR__ . '/warning_replay.inc';
?>
--EXPECTF--
Warning: Unsupported declare 'unknown' in %swarning_replay.inc on line 3
Warning: Unsupported declare 'unknown' in %swarning_replay.inc on line 3