#39424 [Opn->Bgs]: Function Arguments
| From: | bjori@php.net | Date: | Wed, 08 Nov 2006 10:37:21 +0000 |
| Subject: | #39424 [Opn->Bgs]: Function Arguments | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104568@lists.php.net to get a copy of this message | ||
ID: 39424
Updated by: bjori@php.net
Reported By: mojtaba2005sh at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Windows and Linux
PHP Version: 5.2.0
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2006-11-08 07:29:04] mojtaba2005sh at gmail dot com
Description:
------------
When I want to set a default value for a funcion and set the default
value with for example 'rand(1,100)' or a class variable like
'$this->m' it gives a syntax error
this was the error:
syntax error, unexpected '(', expecting ')'
Reproduce code:
---------------
<?php
function test($m=rand(1,100)){
echo $m;
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39424&edit=1