/test/subjects/optimization/array_pop.php
PHP | 14 lines | 8 code | 4 blank | 2 comment | 0 complexity | ce5785e7804be6aa0953a640598a8c5a MD5 | raw file
Possible License(s): GPL-2.0, 0BSD, BSD-3-Clause, Unlicense, MPL-2.0-no-copyleft-exception, LGPL-2.1
- <?php
- // try it without arry_pop
- $a = array (1, 2, 3, 4);
- $b = $a[$argc];
- $a[$argc] = NULL;
- // same thing
- $x = array (1, 2, 3, 4);
- $y = array_pop ($x);
- var_dump ($a, $b, $x, $y);
- ?>