|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-08 10:37 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 10:00:01 2025 UTC |
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; } ?>