Closed eborden closed 10 years ago
Array.indexOf(elem); a -> int | string | false
$a = ['a', 'b', 'c']; $a->indexOf('a'); //0 $a->indexOf('c'); //2 $a->indexOf('d'); //false $a = ['a' => 1, 'b' => 2, 'c' => 3]; $a->indexOf(2); //'b'
Array.has(elem); a -> bool
$a = ['a', 'b', 'c']; $a->indexOf('a'); //true $a->indexOf('d'); //false
implemented with: https://github.com/rossriley/php-scalar-objects/commit/91563c676fc4785c2dd886ffee5161d89fa9ecc3
And: https://github.com/rossriley/php-scalar-objects/commit/fcdfdc630e84eccd8c68593993aa5b47d0ccf8cb
Array.indexOf(elem); a -> int | string | false
Array.has(elem); a -> bool