mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
0d7a638866
As per RFC: https://wiki.php.net/rfc/variadics
19 lines
372 B
PHP
19 lines
372 B
PHP
--TEST--
|
|
ReflectionFunction::isVariadic()
|
|
--FILE--
|
|
<?php
|
|
|
|
function test1($args) {}
|
|
function test2(...$args) {}
|
|
function test3($arg, ...$args) {}
|
|
|
|
var_dump((new ReflectionFunction('test1'))->isVariadic());
|
|
var_dump((new ReflectionFunction('test2'))->isVariadic());
|
|
var_dump((new ReflectionFunction('test3'))->isVariadic());
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
bool(true)
|
|
bool(true)
|