array_flip()
function array_flip(array $array): array
Exchanges all keys with their associated values in an array.
Parameters:
$array(array)
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/array_flip.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how array_flip is implemented in the compiler, see the internals page.