1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/zend_test/tests/observer_basic_05.phpt
Levi Morrison 66c3e900e2 Add zend_observer API
Closes GH-5857.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
2020-09-01 09:59:59 -06:00

33 lines
591 B
PHP

--TEST--
Observer: Basic observability of functions only (no includes)
--SKIPIF--
<?php if (!extension_loaded('zend-test')) die('skip: zend-test extension required'); ?>
--INI--
zend_test.observer.enabled=1
zend_test.observer.observe_functions=1
--FILE--
<?php
function foo()
{
echo 'Foo' . PHP_EOL;
}
foo();
include __DIR__ . '/observer.inc';
foo();
?>
--EXPECTF--
<!-- init '%s/observer_basic_05.php' -->
<!-- init foo() -->
<foo>
Foo
</foo>
<!-- init '%s/observer.inc' -->
<!-- init foo_observer_test() -->
<foo_observer_test>
foo_observer_test
</foo_observer_test>
<foo>
Foo
</foo>