facebook / facebook/hhvm

Fatal error when casting variadic ReflectionParameter to string

Open
#7,404 0 comments 1 reaction 0 assignees View on GitHub
php5 incompatibility php7 incompatibility probably easy
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

``` php
function foo(...$a) {}

$f = new ReflectionFunction('foo');
$p = $f->getParameters()[0];
echo $p;
```

Gives:

> Fatal error: Uncaught exception 'ReflectionException' with message 'Parameter is not optional'

See https://3v4l.org/YsCPJ

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.