/hphp/test/slow/ext_array/array_reverse.php

http://github.com/facebook/hiphop-php · PHP · 23 lines · 18 code · 5 blank · 0 comment · 0 complexity · ae6dd1f9fa9eaa45f3c2dc60a316cb65 MD5 · raw file

  1. <?hh
  2. function a() {
  3. $input = varray["php", 4.0, varray["green", "red"]];
  4. $result = array_reverse($input);
  5. var_dump($result);
  6. $result_keyed = array_reverse($input, true);
  7. var_dump($result_keyed);
  8. }
  9. function b() {
  10. $input = darray["php" => 4.0, 10 => 5.0, "blab" =>"b"];
  11. $result = array_reverse($input);
  12. var_dump($result);
  13. }
  14. <<__EntryPoint>>
  15. function main_array_reverse() {
  16. a();
  17. b();
  18. }