1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/ext/zend_test/tests/observer_declarations_file_cache.phpt
Ilija Tovilo 6622c54c53 Fix class link observer with file_cache_only=1
Previously, notify would only get called on classes with CE_CACHE.
However, during compilation class names are non-permanent which won't
get a CE_CACHE and thus wouldn't not get notified.

Closes GH-9550
2022-09-16 14:15:05 +02:00

24 lines
439 B
PHP

--TEST--
Observer: Observe function and class declarations with file_cache_only
--EXTENSIONS--
zend_test
--INI--
zend_test.observer.enabled=1
zend_test.observer.observe_declaring=1
opcache.enable_cli=1
opcache.file_cache={TMP}
opcache.file_cache_only=1
--FILE--
<?php
function a() {}
class A {}
class B extends A {}
?>
--EXPECTF--
<!-- declared function 'a' -->
<!-- declared class 'a' -->
<!-- declared class 'b' -->
<!-- init '%s' -->