[php-src] Issue #20277: gen_stub.php does not accept variadic parameter

From: Date: Fri, 24 Oct 2025 08:41:14 +0000
Subject: [php-src] Issue #20277: gen_stub.php does not accept variadic parameter
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251110@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20277 Author: mitelg ### Description The following class stub code: ```php <?php class Foo { /** * @param string ...$args This does not work */ public function bar(string ...$args): void; } ``` Executed with sudo php /usr/lib/php/20250925/build/gen_stub.php foo.stub.php Resulted in this output: ``` In foo.stub.php: Foo::bar(): @param doesn't contain a variable name or has an invalid format "string ...$args This does not work" ``` But I expected this output instead: _normal gen_stub.php output_ ### PHP Version ```plain PHP 8.5.0RC1 (cli) (built: Oct 1 2025 20:34:09) (NTS) Copyright (c) The PHP Group Built by Debian Zend Engine v4.5.0RC1, Copyright (c) Zend Technologies with Zend OPcache v8.5.0RC1, Copyright (c), by Zend Technologies But all older versions also do not accept variadic parameters ``` ### Operating System _No response_

« previous php.bugs (#251110) next »