/hphp/test/slow/ext_array/array_pop.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
- <?hh
- function a() {
- $input = varray["orange", "banana", "apple", "raspberryu"];
- $fruit = array_pop(inout $input);
- var_dump($input);
- }
- function b() {
- $input = varray["orange"];
- $fruit = array_pop(inout $input);
- array_push(inout $input, "banana");
- var_dump($input);
- var_dump($fruit);
- }
- <<__EntryPoint>>
- function main_array_pop() {
- a();
- b();
- }