@@ -29,7 +29,7 @@ function new_iterator();
29
29
* can be used as a parameter to be iterated (normally an array).
30
30
*
31
31
* \code
32
- class c implements spl::foreach, spl::forward {
32
+ class c implements spl_foreach, spl_forward {
33
33
private $num = 0;
34
34
function new_iterator() {
35
35
$this->num = 0;
@@ -62,13 +62,13 @@ function has_more() {
62
62
* If you need this you must split the two parts.
63
63
*
64
64
* \code
65
- class c implements spl::foreach {
65
+ class c implements spl_foreach {
66
66
public $max = 3;
67
67
function new_iterator() {
68
68
return new c_iter($this);
69
69
}
70
70
}
71
- class c_iter implements spl::forward {
71
+ class c_iter implements spl_forward {
72
72
private $obj;
73
73
private $num = 0;
74
74
function __construct($obj) {
@@ -97,13 +97,13 @@ function has_more() {
97
97
* You can also use this interface with the for() construct.
98
98
*
99
99
* \code
100
- class c implements spl::foreach {
100
+ class c implements spl_foreach {
101
101
public $max = 3;
102
102
function new_iterator() {
103
103
return new c_iter($this);
104
104
}
105
105
}
106
- class c_iter implements spl::forward {
106
+ class c_iter implements spl_forward {
107
107
private $obj;
108
108
private $num = 0;
109
109
function __construct($obj) {
@@ -212,7 +212,7 @@ function get($index);
212
212
*
213
213
* The following example shows how to use an array_writer:
214
214
* \code
215
- class array_emulation implemets spl::array_access {
215
+ class array_emulation implemets spl_array_access {
216
216
private $ar = array();
217
217
function exists($index) {
218
218
return array_key_exists($index, $this->ar);
@@ -245,7 +245,7 @@ function set($value, $index);
245
245
*
246
246
* The following example shows how to use a customized array_writer:
247
247
* \code
248
- class array_emulation_ex extends array_emulation implemets spl::array_access_ex {
248
+ class array_emulation_ex extends array_emulation implemets spl_array_access_ex {
249
249
private $last_index = NULL;
250
250
function new_writer($index) {
251
251
$last_index = $index;
0 commit comments