IT. Expert System.

PHP

Move to the next entry


SplObjectStorage::next

(PHP 5 >= 5.1.0)

SplObjectStorage::nextMove to the next entry

Description

public void SplObjectStorage::next ( void )

Moves the iterator to the next object in the storage.

Parameters

This function has no parameters.

Return Values

No value is returned.

Examples

Example #1 SplObjectStorage::next() example

<?php
$s 
= new SplObjectStorage();

$o1 = new StdClass;
$o2 = new StdClass;

$s->attach($o1"d1");
$s->attach($o2"d2");

$s->rewind();
while(
$s->valid()) {
    
$index  $s->key();
    
$object $s->current(); // similar to current($s)

    
var_dump($index);
    
var_dump($object);
    
$s->next();
}
?>

The above example will output something similar to:

 int(0) object(stdClass)#2 (0) { } int(1) object(stdClass)#3 (0) { } 

See Also



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3428 / . Delta: 0.05413 с