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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -