| @@ 1075-1079 (lines=5) @@ | ||
| 1072 | $index = 0; |
|
| 1073 | $keys = array_keys($list); |
|
| 1074 | $length = count($keys); |
|
| 1075 | while ($index < $length) { |
|
| 1076 | if (_equals($item, $list[$keys[$index]])) |
|
| 1077 | return $keys[$index]; |
|
| 1078 | $index ++; |
|
| 1079 | } |
|
| 1080 | return -1; |
|
| 1081 | }); |
|
| 1082 | return _apply($indexOf, func_get_args()); |
|
| @@ 1114-1118 (lines=5) @@ | ||
| 1111 | $list = (array) $list; |
|
| 1112 | $keys = array_keys($list); |
|
| 1113 | $index = count($list) - 1; |
|
| 1114 | while ($index >= 0) { |
|
| 1115 | if (_equals($list[$keys[$index]], $item)) |
|
| 1116 | return $keys[$index]; |
|
| 1117 | $index --; |
|
| 1118 | } |
|
| 1119 | return -1; |
|
| 1120 | }); |
|
| 1121 | return _apply($lastIndexOf, func_get_args()); |
|