How to use default arguments in php
Posted
by liysd
on Stack Overflow
See other posts from Stack Overflow
or by liysd
Published on 2010-05-13T19:07:46Z
Indexed on
2010/05/13
19:14 UTC
Read the original article
Hit count: 257
I want to define a function doSomething(arg1, arg2)
with default values to arg1=val and arg2=val
When I write
function doSomething($arg1="value1", $arg2="value2"){
// do something
}
Is it possible now to call doSomething with default arg1 and arg2="new_value2"
© Stack Overflow or respective owner