/test/subjects/optimization/array_pop.php

http://phc.googlecode.com/ · PHP · 14 lines · 8 code · 4 blank · 2 comment · 0 complexity · ce5785e7804be6aa0953a640598a8c5a MD5 · raw file

  1. <?php
  2. // try it without arry_pop
  3. $a = array (1, 2, 3, 4);
  4. $b = $a[$argc];
  5. $a[$argc] = NULL;
  6. // same thing
  7. $x = array (1, 2, 3, 4);
  8. $y = array_pop ($x);
  9. var_dump ($a, $b, $x, $y);
  10. ?>