PageRenderTime 41ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/ext_array/current.php

http://github.com/facebook/hiphop-php
PHP | 29 lines | 24 code | 5 blank | 0 comment | 0 complexity | 409cc0892fcaffd9f875ed7730c5a29e 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. $transport = varray["foot", "bike", "car", "plane"];
  4. var_dump(current($transport));
  5. var_dump(next(inout $transport));
  6. var_dump(current($transport));
  7. var_dump(prev(inout $transport));
  8. var_dump(end(inout $transport));
  9. var_dump(current($transport));
  10. }
  11. function b() {
  12. $arr = varray[];
  13. var_dump(current($arr));
  14. }
  15. function c() {
  16. $arr = varray[varray[]];
  17. var_dump(current($arr));
  18. }
  19. <<__EntryPoint>>
  20. function main_current() {
  21. a();
  22. b();
  23. c();
  24. }