Reputation: 2480
I have hard time understanding the syntax of the following function (and others alike):
int fwrite ( resource $handle , string $string [, int $length ] )
what is the meaning of the brackets and comma that follows [, int $length ]
. what it should indicate?
Upvotes: 0
Views: 50
Reputation: 272106
The the following example:
int fwrite ( resource $handle , string $string [, int $length ] )
int
represents the data type returned by the function= <some value>
indicating the default value that is used if you omit that parameterUpvotes: 0
Reputation: 7446
[, int $length] indicates an optional parameter you may add when you use the comfort function fwrite. Moreover, it also tells you that it has to be an integer.
Upvotes: 0