
---- EXPECTED OUTPUT
Popping elements off end of an unreferenced array
---( Array with 1 element(s): )---
--> State of array before loop:
array(1) {
  [0]=>
  string(3) "v.0"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
--> State of array after loop:
array(0) {
}

---( Array with 2 element(s): )---
--> State of array before loop:
array(2) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
--> State of array after loop:
array(0) {
}

---( Array with 3 element(s): )---
--> State of array before loop:
array(3) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
--> State of array after loop:
array(0) {
}

---( Array with 4 element(s): )---
--> State of array before loop:
array(4) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(3) "v.3"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
     iteration 3:  $k=3; $v=v.3
--> State of array after loop:
array(0) {
}



Shift elements off start of an unreferenced array
---( Array with 1 element(s): )---
--> State of array before loop:
array(1) {
  [0]=>
  string(3) "v.0"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
--> State of array after loop:
array(0) {
}

---( Array with 2 element(s): )---
--> State of array before loop:
array(2) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
--> State of array after loop:
array(0) {
}

---( Array with 3 element(s): )---
--> State of array before loop:
array(3) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
--> State of array after loop:
array(0) {
}

---( Array with 4 element(s): )---
--> State of array before loop:
array(4) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(3) "v.3"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
     iteration 3:  $k=3; $v=v.3
--> State of array after loop:
array(0) {
}



Remove current element of an unreferenced array
---( Array with 1 element(s): )---
--> State of array before loop:
array(1) {
  [0]=>
  string(3) "v.0"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
--> State of array after loop:
array(0) {
}

---( Array with 2 element(s): )---
--> State of array before loop:
array(2) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
--> State of array after loop:
array(0) {
}

---( Array with 3 element(s): )---
--> State of array before loop:
array(3) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
--> State of array after loop:
array(0) {
}

---( Array with 4 element(s): )---
--> State of array before loop:
array(4) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(3) "v.3"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
     iteration 3:  $k=3; $v=v.3
--> State of array after loop:
array(0) {
}



Adding elements to the end of an unreferenced array
---( Array with 1 element(s): )---
--> State of array before loop:
array(1) {
  [0]=>
  string(3) "v.0"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
--> State of array after loop:
array(2) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(5) "new.0"
}

---( Array with 2 element(s): )---
--> State of array before loop:
array(2) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
--> State of array after loop:
array(4) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(5) "new.0"
  [3]=>
  string(5) "new.1"
}

---( Array with 3 element(s): )---
--> State of array before loop:
array(3) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
--> State of array after loop:
array(6) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(5) "new.0"
  [4]=>
  string(5) "new.1"
  [5]=>
  string(5) "new.2"
}

---( Array with 4 element(s): )---
--> State of array before loop:
array(4) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(3) "v.3"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
     iteration 3:  $k=3; $v=v.3
--> State of array after loop:
array(8) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(3) "v.3"
  [4]=>
  string(5) "new.0"
  [5]=>
  string(5) "new.1"
  [6]=>
  string(5) "new.2"
  [7]=>
  string(5) "new.3"
}



Adding elements to the start of an unreferenced array
---( Array with 1 element(s): )---
--> State of array before loop:
array(1) {
  [0]=>
  string(3) "v.0"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
--> State of array after loop:
array(2) {
  [0]=>
  string(5) "new.0"
  [1]=>
  string(3) "v.0"
}

---( Array with 2 element(s): )---
--> State of array before loop:
array(2) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
--> State of array after loop:
array(4) {
  [0]=>
  string(5) "new.1"
  [1]=>
  string(5) "new.0"
  [2]=>
  string(3) "v.0"
  [3]=>
  string(3) "v.1"
}

---( Array with 3 element(s): )---
--> State of array before loop:
array(3) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
--> State of array after loop:
array(6) {
  [0]=>
  string(5) "new.2"
  [1]=>
  string(5) "new.1"
  [2]=>
  string(5) "new.0"
  [3]=>
  string(3) "v.0"
  [4]=>
  string(3) "v.1"
  [5]=>
  string(3) "v.2"
}

---( Array with 4 element(s): )---
--> State of array before loop:
array(4) {
  [0]=>
  string(3) "v.0"
  [1]=>
  string(3) "v.1"
  [2]=>
  string(3) "v.2"
  [3]=>
  string(3) "v.3"
}
--> Do loop:
     iteration 0:  $k=0; $v=v.0
     iteration 1:  $k=1; $v=v.1
     iteration 2:  $k=2; $v=v.2
     iteration 3:  $k=3; $v=v.3
--> State of array after loop:
array(8) {
  [0]=>
  string(5) "new.3"
  [1]=>
  string(5) "new.2"
  [2]=>
  string(5) "new.1"
  [3]=>
  string(5) "new.0"
  [4]=>
  string(3) "v.0"
  [5]=>
  string(3) "v.1"
  [6]=>
  string(3) "v.2"
  [7]=>
  string(3) "v.3"
}
---- ACTUAL OUTPUT
Usage: php
      php -[b|c|n|h|i|q|s|v|?] [<file>] [args...]
  Run in LSAPI mode, only '-b', '-s' and '-c' are effective
  Run in Command Line Interpreter mode when parameters are specified

  -b <address:port>|<port> Bind Path for external LSAPI Server mode
  -c <path>|<file> Look for php.ini file in this directory
  -n    No php.ini file will be used
  -h    This help
  -i    PHP information
  -l    Syntax check
  -q    Quiet-mode.  Suppress HTTP Header output.
  -s    Display colour syntax highlighted source.
  -v    Version number
  -?    This help

  args...    Arguments passed to script.
---- FAILED
