.. efun:: int reverse(int arg) string reverse(string arg) mixed * reverse(mixed * arg) mixed * reverse(mixed * & arg) Reverse the content of array or string :arg:`arg` and return the result. If :arg:`arg` is an integer, the bits in the integer are reversed. If called in the reference variant, the argument array itself is reversed and then returned. .. usage:: :: reverse(0x306a) // returns 0x560c0000 reverse("test") // returns "tset" mixed * arr = ({ 1, 2 }); reverse(arr) // returns ({ 2, 1 }), leaves arr unchanged. reverse(&arr) // returns ({ 2, 1 }), sets arr to ({ 2, 1 }) .. limit:: Reference ranges like ``reverse(&(a[1..2]))`` are not supported. :history 3.3.529 introduced: :history 3.3.532 changed: added the reversal of bits in an integer. .. todo:: should blank seealso below be an error? .. seealso::