mirror of
https://github.com/php/php-src.git
synced 2026-04-17 04:51:03 +02:00
The extension name should match the name of the ext/ directory, otherwise it will not get picked up by run-tests. It would be possible to remap this in run-tests, but I think it's better to rename the extension to follow the standard format. Other extensions also use underscore instead of hyphen (e.g. pdo_mysql and not pdo-mysql). Of course, the ./configure option remains hyphenated. Closes GH-6613.
56 lines
765 B
PHP
56 lines
765 B
PHP
--TEST--
|
|
Observer: Basic observability of userland functions
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded('zend_test')) die('skip: zend_test extension required'); ?>
|
|
--INI--
|
|
zend_test.observer.enabled=1
|
|
zend_test.observer.observe_all=1
|
|
--FILE--
|
|
<?php
|
|
function bar()
|
|
{
|
|
echo 'Bar' . PHP_EOL;
|
|
var_dump(array_sum([1,2,3]));
|
|
}
|
|
|
|
function foo()
|
|
{
|
|
echo 'Foo' . PHP_EOL;
|
|
bar();
|
|
}
|
|
|
|
foo();
|
|
foo();
|
|
foo();
|
|
|
|
echo 'DONE' . PHP_EOL;
|
|
?>
|
|
--EXPECTF--
|
|
<!-- init '%s%eobserver_basic_01.php' -->
|
|
<file '%s%eobserver_basic_01.php'>
|
|
<!-- init foo() -->
|
|
<foo>
|
|
Foo
|
|
<!-- init bar() -->
|
|
<bar>
|
|
Bar
|
|
int(6)
|
|
</bar>
|
|
</foo>
|
|
<foo>
|
|
Foo
|
|
<bar>
|
|
Bar
|
|
int(6)
|
|
</bar>
|
|
</foo>
|
|
<foo>
|
|
Foo
|
|
<bar>
|
|
Bar
|
|
int(6)
|
|
</bar>
|
|
</foo>
|
|
DONE
|
|
</file '%s%eobserver_basic_01.php'>
|