php - Why do some array parameters have a comma after opening parentheses? -


what syntax i've seen documentations applying, example:

jquery sizzle

sizzle( string selector[, domnode context[, array results]] )

codeiginiter 3

set_userdata($data[, $value = null])

basically, means, parameters inside [] optional. dont need pass in order make function call work:

foo($param [, $param2 = null, $param3 = 1]) 

$param1 , $param2 optional, $param mandatory.


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -