mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
18 lines
372 B
PHP
18 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)
|