diff options
author | Christopher Jones <sixd@php.net> | 2013-09-26 09:57:36 -0700 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2013-09-26 09:57:36 -0700 |
commit | a3b0fa0d04cad5712f64e08463d0026f9890a37c (patch) | |
tree | 1317a8a47c0e4bd1193c8fbf705d91ae75140f78 /ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt | |
parent | c175617b800536c08b593cf080f8120623cc009e (diff) | |
parent | 0d7a6388663b76ebed6585ac92dfca5ef65fa7af (diff) | |
download | php-git-a3b0fa0d04cad5712f64e08463d0026f9890a37c.tar.gz |
Merge branch 'master' of https://git.php.net/repository/php-src
# By Adam Harvey (2) and others
# Via Adam Harvey (2) and others
* 'master' of https://git.php.net/repository/php-src:
Implement variadic function syntax
Added function opcache_compile_file() to load PHP scripts into cache without execution.
Fixed issue #135 (segfault in interned strings if initial memory is too low)
Fix typo: HTTP_ROW_POST_DATA → HTTP_RAW_POST_DATA.
Make message and format arguments const char * to avoid build warning about invalid cast.
Copy dba_*() keys before converting to string.
Diffstat (limited to 'ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt')
-rw-r--r-- | ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt b/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt new file mode 100644 index 0000000000..50b6bb495e --- /dev/null +++ b/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt @@ -0,0 +1,18 @@ +--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) |