PHP Manual
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
FiberError::__construct
Traversable
Language Reference
PHP Manual
Predefined Interfaces and Classes
Table of Contents
Traversable
— The Traversable interface
Iterator
— The Iterator interface
Iterator::current
— Return the current element
Iterator::key
— Return the key of the current element
Iterator::next
— Move forward to next element
Iterator::rewind
— Rewind the Iterator to the first element
Iterator::valid
— Checks if current position is valid
IteratorAggregate
— The IteratorAggregate interface
IteratorAggregate::getIterator
— Retrieve an external iterator
InternalIterator
— The InternalIterator class
InternalIterator::__construct
— Private constructor to disallow direct instantiation
InternalIterator::current
— Return the current element
InternalIterator::key
— Return the key of the current element
InternalIterator::next
— Move forward to next element
InternalIterator::rewind
— Rewind the Iterator to the first element
InternalIterator::valid
— Check if current position is valid
Throwable
— Throwable
Throwable::getMessage
— Gets the message
Throwable::getCode
— Gets the exception code
Throwable::getFile
— Gets the file in which the object was created
Throwable::getLine
— Gets the line on which the object was instantiated
Throwable::getTrace
— Gets the stack trace
Throwable::getTraceAsString
— Gets the stack trace as a string
Throwable::getPrevious
— Returns the previous Throwable
Throwable::__toString
— Gets a string representation of the thrown object
ArrayAccess
— The ArrayAccess interface
ArrayAccess::offsetExists
— Whether an offset exists
ArrayAccess::offsetGet
— Offset to retrieve
ArrayAccess::offsetSet
— Assign a value to the specified offset
ArrayAccess::offsetUnset
— Unset an offset
Serializable
— The Serializable interface
Serializable::serialize
— String representation of object
Serializable::unserialize
— Constructs the object
Closure
— The Closure class
Closure::__construct
— Constructor that disallows instantiation
Closure::bind
— Duplicates a closure with a specific bound object and class scope
Closure::bindTo
— Duplicates the closure with a new bound object and class scope
Closure::call
— Binds and calls the closure
Closure::fromCallable
— Converts a callable into a closure
stdClass
— The stdClass class
Generator
— The Generator class
Generator::current
— Get the yielded value
Generator::getReturn
— Get the return value of a generator
Generator::key
— Get the yielded key
Generator::next
— Resume execution of the generator
Generator::rewind
— Rewind the iterator
Generator::send
— Send a value to the generator
Generator::throw
— Throw an exception into the generator
Generator::valid
— Check if the iterator has been closed
Generator::__wakeup
— Serialize callback
Fiber
— The Fiber class
Fiber::__construct
— Creates a new Fiber instance
Fiber::start
— Start execution of the fiber
Fiber::resume
— Resumes execution of the fiber with a value
Fiber::throw
— Resumes execution of the fiber with an exception
Fiber::getReturn
— Gets the value returned by the Fiber
Fiber::isStarted
— Determines if the fiber has started
Fiber::isSuspended
— Determines if the fiber is suspended
Fiber::isRunning
— Determines if the fiber is running
Fiber::isTerminated
— Determines if the fiber has terminated
Fiber::suspend
— Suspends execution of the current fiber
Fiber::getCurrent
— Gets the currently executing Fiber instance
WeakReference
— The WeakReference class
WeakReference::__construct
— Constructor that disallows instantiation
WeakReference::create
— Create a new weak reference
WeakReference::get
— Get a weakly referenced Object
WeakMap
— The WeakMap class
WeakMap::count
— Counts the number of live entries in the map
WeakMap::getIterator
— Retrieve an external iterator
WeakMap::offsetExists
— Checks whether a certain object is in the map
WeakMap::offsetGet
— Returns the value pointed to by a certain object
WeakMap::offsetSet
— Updates the map with a new key-value pair
WeakMap::offsetUnset
— Removes an entry from the map
Stringable
— The Stringable interface
Stringable::__toString
— Gets a string representation of the object
UnitEnum
— The UnitEnum interface
UnitEnum::cases
— Generates a list of cases on an enum
BackedEnum
— The BackedEnum interface
BackedEnum::from
— Maps a scalar to an enum instance
BackedEnum::tryFrom
— Maps a scalar to an enum instance or null
SensitiveParameterValue
— The SensitiveParameterValue class
SensitiveParameterValue::__construct
— Constructs a new SensitiveParameterValue object
SensitiveParameterValue::__debugInfo
— Protects the sensitive value against accidental exposure
SensitiveParameterValue::getValue
— Returns the sensitive value
__PHP_Incomplete_Class
— The __PHP_Incomplete_Class class
See also the
SPL Interfaces
and
reserved classes
.