PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/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
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
  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. }