You are here

public function SplStack::toArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-stdlib/src/SplStack.php \Zend\Stdlib\SplStack::toArray()

Serialize to an array representing the stack

Return value

array

Overrides SplStack::toArray

1 call to SplStack::toArray()
SplStack::serialize in vendor/zendframework/zend-stdlib/src/SplStack.php
Serialize
1 method overrides SplStack::toArray()
SplStack::toArray in vendor/zendframework/zend-stdlib/src/SplStack.php
Serialize to an array representing the stack

File

vendor/zendframework/zend-stdlib/src/SplStack.php, line 24

Class

SplStack
Serializable version of SplStack

Namespace

Zend\Stdlib

Code

public function toArray() {
  $array = [];
  foreach ($this as $item) {
    $array[] = $item;
  }
  return $array;
}