mirror of
https://github.com/php/php-src.git
synced 2026-04-18 13:31:27 +02:00
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
24 lines
439 B
PHP
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' -->
|