(PHP 5 >= 5.1.0, PHP 7, PHP 8)
SplObjectStorage::current — Returns the current storage entry
Returns the current storage entry.
此函數(shù)沒有參數(shù)。
The object at the current iterator position.
版本 | 說明 |
---|---|
8.1.0 |
SplObjectStorage::current() now throws an Error exception
if the current position is invalid. Previously, false was returned instead.
|
示例 #1 SplObjectStorage::current() example
以上例程的輸出類似于:
object(stdClass)#2 (0) { } string(2) "d1" object(stdClass)#3 (0) { } string(2) "d2"