php-src/ext/phar/tests/bug74383.phpt
Joe Watkins 9fe4d2d9cb
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix of Bug #74383: Wrong reflection on Phar::running
2017-04-10 06:32:40 +01:00

21 lines
426 B
PHP

--TEST--
Phar: bug #74383: Wrong reflection on Phar::running
--SKIPIF--
<?php if (!extension_loaded("phar") || !extension_loaded('reflection')) die("skip"); ?>
--FILE--
<?php
$rc = new ReflectionClass(Phar::class);
$rm = $rc->getMethod("running");
echo $rm->getNumberOfParameters();
echo PHP_EOL;
echo $rm->getNumberOfRequiredParameters();
echo PHP_EOL;
echo (int) $rm->getParameters()[0]->isOptional();
?>
--EXPECT--
1
0
1