/hphp/test/slow/ext_array/array_reverse.php
PHP | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | ae6dd1f9fa9eaa45f3c2dc60a316cb65 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?hh
- function a() {
- $input = varray["php", 4.0, varray["green", "red"]];
- $result = array_reverse($input);
- var_dump($result);
- $result_keyed = array_reverse($input, true);
- var_dump($result_keyed);
- }
- function b() {
- $input = darray["php" => 4.0, 10 => 5.0, "blab" =>"b"];
- $result = array_reverse($input);
- var_dump($result);
- }
- <<__EntryPoint>>
- function main_array_reverse() {
- a();
- b();
- }