[Top]
|
Method `&()
- Method
`&
mixed `&(mixed arg1)
mixed `&(object arg1, mixed arg2)
mixed `&(mixed arg1, object arg2)
int `&(int arg1, int arg2)
array `&(array arg1, array arg2)
multiset `&(multiset arg1, multiset arg2)
mapping `&(mapping arg1, mapping arg2)
string `&(string arg1, string arg2)
object(type) `&(object(type)|program arg1, object(type)|program arg2)
mapping `&(mapping arg1, array arg2)
mapping `&(array arg1, mapping arg2)
mapping `&(mapping arg1, multiset arg2)
mapping `&(multiset arg1, mapping arg2)
mixed `&(mixed arg1, mixed arg2, mixed ... extras)
- Description
-
Bitwise and/intersection operator.
- Returns
If there's a single argument, that argument will be returned.
If there are more than two arguments, the result will be:
`&(`&(arg1, arg2), @extras) .
If arg1 is an object that has an lfun::`&(), that function
will be called with arg2 as the single argument.
If arg2 is an object that has an lfun::``&(), that function
will be called with arg1 as the single argument.
Otherwise the result will be as follows:
arg1 can have any of the following types:
| int | The result will be the bitwise and of arg1 and arg2.
|
| array | The result will be the elements of arg1 and arg2 that
occurr in both.
|
| object(type) | The result will be the type intersection of arg1 and arg2.
|
| string | The result will be the string where the elements of arg1
and arg2 have been pairwise bitwise anded.
|
|
- See also
`|, lfun::`&(), lfun::``&()
|