rfc:arrayof

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:arrayof [2014/01/15 21:39] – Added note about scalar type hinting philsturfc:arrayof [2014/01/17 11:43] krakjoe
Line 21: Line 21:
 </code> </code>
  
-The square brackets allow type-hinting for an array where each value is of a specific type. This is handy when simply type-hinting with "array" is just not clear enough what the content should be. It improves readability and self-documentation of the signature, and avoids asking users to forech through the argument to calculate if each item is of the expected type.+The square brackets allow type-hinting for an array where each value is of a specific type. This is handy when simply type-hinting with "array" is just not clear enough what the content should be. It improves readability and self-documentation of the signature, and avoids asking users to foreach through the argument to verify if each item is of the expected type.
  
 Default values can still be used: Default values can still be used:
rfc/arrayof.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1