blob: f28edfda413b396e4b39191ca6a59f60a1fc73a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--TEST--
SPL: FixedArray: overriden iterator methods
--FILE--
<?php
class SplFixedArray2 extends SplFixedArray {
public function rewind() {
echo "rewind\n";
return parent::rewind();
}
public function valid() {
echo "valid\n";
return parent::valid();
}
public function next() {
echo "next\n";
return parent::next();
}
public function current() {
echo "current\n";
return parent::current();
}
public function key() {
echo "key\n";
return parent::key();
}
}
$fa = new SplFixedArray2(3);
foreach($fa as $k=>$v) {
echo "$k=>";
var_dump($v);
}
?>
--EXPECT--
rewind
valid
current
key
0=>NULL
next
valid
current
key
1=>NULL
next
valid
current
key
2=>NULL
next
valid
|