mirror of
https://github.com/php/php-src.git
synced 2026-04-25 08:58:28 +02:00
dbe5725ff3
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.
40 lines
954 B
PHP
40 lines
954 B
PHP
--TEST--
|
|
Observer: call_user_func() from namespace
|
|
--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
|
|
namespace Test {
|
|
final class MyClass
|
|
{
|
|
public static function myMethod()
|
|
{
|
|
echo 'MyClass::myMethod called' . PHP_EOL;
|
|
}
|
|
}
|
|
|
|
function my_function()
|
|
{
|
|
echo 'my_function called' . PHP_EOL;
|
|
}
|
|
|
|
call_user_func('Test\\MyClass::myMethod');
|
|
call_user_func('Test\\my_function');
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
<!-- init '%s%eobserver_call_user_func_%d.php' -->
|
|
<file '%s%eobserver_call_user_func_%d.php'>
|
|
<!-- init Test\MyClass::myMethod() -->
|
|
<Test\MyClass::myMethod>
|
|
MyClass::myMethod called
|
|
</Test\MyClass::myMethod>
|
|
<!-- init Test\my_function() -->
|
|
<Test\my_function>
|
|
my_function called
|
|
</Test\my_function>
|
|
</file '%s%eobserver_call_user_func_%d.php'>
|