PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/ext_array/array_pop.php

http://github.com/facebook/hiphop-php
PHP | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | 1bd5c633d1b0a4497904c2c20b965bba 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["orange", "banana", "apple", "raspberryu"];
  4. $fruit = array_pop(inout $input);
  5. var_dump($input);
  6. }
  7. function b() {
  8. $input = varray["orange"];
  9. $fruit = array_pop(inout $input);
  10. array_push(inout $input, "banana");
  11. var_dump($input);
  12. var_dump($fruit);
  13. }
  14. <<__EntryPoint>>
  15. function main_array_pop() {
  16. a();
  17. b();
  18. }