Engineering-Best-Practices icon indicating copy to clipboard operation
Engineering-Best-Practices copied to clipboard

- including strict param in in_array

Open zutigrm opened this issue 2 years ago • 0 comments

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."

zutigrm avatar Aug 15 '23 15:08 zutigrm