php-src/Zend/tests/magic_methods/call_static_002.phpt
DanielEScherzer 618190127e
Zend/tests: organize some tests with sub directories (8) (#17873)
Create new sub directories for tests related to backtraces and for tests
related to `$this` being reserved in different places and not being usable or
reassignable.

Work towards GH-15631
2025-02-22 19:10:59 +00:00

26 lines
434 B
PHP

--TEST--
Testing __call and __callstatic with callbacks
--FILE--
<?php
class Foo {
public function __call($a, $b) {
print "nonstatic\n";
var_dump($a);
}
static public function __callStatic($a, $b) {
print "static\n";
var_dump($a);
}
}
$a = new Foo;
call_user_func(array($a, 'aAa'));
call_user_func(array('Foo', 'aAa'));
?>
--EXPECT--
nonstatic
string(3) "aAa"
static
string(3) "aAa"