php-src/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt
2013-09-26 18:39:17 +02:00

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)