PageRenderTime 24ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/ext_array/array_unshift.php

http://github.com/facebook/hiphop-php
PHP | 14 lines | 11 code | 3 blank | 0 comment | 0 complexity | cd78b8eebdc26c52920cfc7ef7093cbe 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. <<__EntryPoint>>
  3. function main_array_unshift() {
  4. $q = varray["orange", "banana"];
  5. array_unshift(inout $q, "apple", "raspberry");
  6. var_dump($q);
  7. $q = darray[0 => "orange", 1 => "banana", "a" => "dummy"];
  8. unset($q['a']);
  9. array_unshift(inout $q, "apple", "raspberry");
  10. var_dump($q);
  11. }