Voting

: max(two, eight)?
(Example: nine)

The Note You're Voting On

maciej at speccode dot com
8 years ago
FYI, remember that strict mode is something that might save you hours.

If you're searching for a string and you have a "true" boolean on the way - you will get it as result (first occurrence). Example below:

<?php

$arr
= [
'foo' => 'bar',
'abc' => 'def',
'bool' => true,
'target' => 'xyz'
];

var_dump( array_search( 'xyz', $arr ) ); //bool
var_dump( array_search( 'xyz', $arr, true ) ); //target

?>

<< Back to user notes page

To Top