ID: 39424 Updated by: [EMAIL PROTECTED] 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
