10up / Engineering-Best-Practices

10up Engineering Best Practices
https://10up.github.io/Engineering-Best-Practices/
MIT License
760 stars 205 forks source link

- including strict param in in_array #397

Open zutigrm opened 1 year ago

zutigrm commented 1 year ago

Included third parameter for in_array example to adhere to the guide in the next section (https://10up.github.io/Engineering-Best-Practices/php/#build-arrays-that-encourage-lookup-by-key-instead-of-search-by-value):

_"In case you don't have control over the array creation process and are forced to use in_array(), to improve the performance slightly, you should always set the third parameter to true to force use of strict comparison."_