|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #521 Variable Number Function Args
Submitted: 1998-07-08 14:20 UTC Modified: 1998-07-10 07:23 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: jwalsh at verio dot net Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Final Release OS: Solaris 2.5x
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jwalsh at verio dot net
New email:
PHP Version: OS:


 [1998-07-08 14:20 UTC] jwalsh at verio dot net
$FONT_OPEN = "<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\">";
$FONT_CLOSE = "</font>";

function print_text ($print_text, $fo=$FONT_OPEN, $fc=$FONT_CLOSE) {
	printf( "%s%s%s\n", $fo, $print_text, $fc );
	return 1;

gives a parse error at the function declaration.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-10 07:23 UTC] zeev
As the documentation says (or at least I think it does, perhaps it's not yet documented), *only* scalar values are supported
as argument defaults.  That includes strings, numbers and constants - nothing else is supported (including variables).

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 19:01:30 2024 UTC