mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
7485978339
This is an automated migration of most SKIPIF extension_loaded checks.
40 lines
880 B
PHP
40 lines
880 B
PHP
--TEST--
|
|
Observer: call_user_func() from namespace
|
|
--EXTENSIONS--
|
|
zend_test
|
|
--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'>
|