php-src/Zend/tests/magic_methods/call_static.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

20 lines
424 B
PHP

--TEST--
__callStatic() Magic method
--FILE--
<?php
class Test
{
static function __callStatic($fname, $args)
{
echo $fname, '() called with ', count($args), " arguments\n";
}
}
call_user_func("Test::Two", 'A', 'B');
call_user_func(array("Test", "Three"), NULL, 0, false);
Test::Four(5, 6, 7, 8);
?>
--EXPECT--
Two() called with 2 arguments
Three() called with 3 arguments
Four() called with 4 arguments