PHP Tutorial ArrayObject

Update

  1. Appends the value with ArrayObject::append in PHP
  2. Exchange the array for another one with ArrayObject::exchangeArray in PHP
  3. Set the behavior flags with ArrayObject::setFlags in PHP
  4. Set the iterator classname for the ArrayObject from ArrayObject::setIteratorClass in PHP
  5. Unsets the value at the specified index with ArrayObject::offsetUnset in PHP

Array Object

  1. Check if requested index exists in an array ArrayObject::offsetExists in PHP
  2. Check whether array contains more entries with ArrayIterator::valid in PHP
  3. Serialize an ArrayObject with ArrayObject::serialize in PHP

Create

  1. Construct a new array object with ArrayObject::__construct from array in PHP
  2. Create a copy of the ArrayObject with ArrayObject::getArrayCopy in PHP
  3. Create a new iterator from an ArrayObject instance with ArrayObject::getIterator in PHP

Loop

  1. Get current array entry with ArrayIterator::current in PHP
  2. Get current array key with ArrayIterator::key in PHP
  3. Move to next entry with ArrayIterator::next in PHP
  4. Rewind array back to the start with ArrayIterator::rewind in PHP

Get

  1. Get the behavior flags with ArrayObject::getFlags in PHP
  2. Get the iterator classname for the ArrayObject with ArrayObject::getIteratorClass in PHP
  3. Get the number of public properties in the ArrayObject in PHP

Sort

  1. Sort an array using a case insensitive " natural order " algorithm with ArrayObject::natcasesort in PHP
  2. Sort array with a user-defined function and maintain key association with ArrayObject::uasort in PHP
  3. Sort entries using a " natural order " algorithm with ArrayObject::natsort in PHP
  4. Sort the entries by key with ArrayObject::ksort in PHP
  5. Sort the entries by keys using a user-defined comparison function with ArrayObject::uksort in PHP
  6. Sort the entries by value with ArrayObject::asort in PHP




















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone