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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -