PhpRiot
Follow phpriot on Twitter
Sponsored Link
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

The ArrayObject class

Introduction

This class allows objects to work as arrays.

Class synopsis

/* Constants */
const integer ArrayObject->STD_PROP_LIST = 1 ;
const integer ARRAY_AS_PROPS = 2 ;
/* Methods */
ArrayObject::__construct ([ mixed $input [, int $flags [, string $iterator_class ]]] )
void ArrayObject::append ( mixed $value )
void ArrayObject::asort ( void )
int ArrayObject::count ( void )
int ArrayObject::getFlags ( void )
ArrayIterator ArrayObject::getIterator ( void )
public string ArrayObject::getIteratorClass ( void )
void ArrayObject::ksort ( void )
void ArrayObject::natsort ( void )
mixed ArrayObject::offsetGet ( mixed $index )
void ArrayObject::offsetSet ( mixed $index , mixed $newval )
public void ArrayObject::serialize ( void )
void ArrayObject::setFlags ( int $flags )
void ArrayObject::setIteratorClass ( string $iterator_class )
void ArrayObject::uasort ( callback $cmp_function )
void ArrayObject::uksort ( callback $cmp_function )
public void ArrayObject::unserialize ( string $serialized )
}

Predefined Constants

ArrayObject Flags

ArrayObject::STD_PROP_LIST

Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).

ArrayObject::ARRAY_AS_PROPS

Entries can be accessed as properties (read and write).

Changelog

Version Description
5.3.0 Implements Serializable.

Table of Contents

PHP Manual