PHPWrap an array in an object that supports indexed mutation, counting and iterator methods. seek takes a zero-based traversal position even for an associative array and throws OutOfBoundsException outside the available positions. getArrayCopy returns the iterator contents as an array.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPAssertionError is an Error raised for a false executed assertion when assertion exceptions are enabled.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPBadMethodCallException specializes BadFunctionCallException for invalid method calls.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPWrap an Iterator with one-element lookahead. hasNext reports whether another item follows the current one, useful for separators without trailing punctuation.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPFilter an Iterator lazily by invoking a callback with the current value, key and inner iterator.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPAn anonymous or arrow function is a Closure object. fromCallable creates one from a callable in the current visibility scope.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPSupply count(): int so the global count function can ask an object for its size.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPRepresent calendar instructions such as one month or a duration such as thirty days.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPIterate recurring dates without building the whole list.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPRepresent a mutable date and time.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPKeep an original date while deriving adjusted dates.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPUse a named time zone to apply regional offset rules to an instant. getOffset returns signed seconds east of UTC and can differ by season in the same zone.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPDivisionByZeroError is an ArithmeticError raised by division or remainder with a zero divisor in PHP 8.4, including intdiv.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPDomainException is a LogicException for a value outside an operation’s defined domain.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPProvide an Iterator with no positions when a routine expects an iterator but has nothing to yield. rewind and next leave it invalid, and foreach executes no iterations.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPError is the base of PHP engine error objects such as TypeError and ValueError.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPRepresent an exceptional application condition with a message, integer code and optional previous Throwable.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPSuspend and resume a cooperative execution context, available since PHP 8.1. start returns the value given to suspend, while the next resume argument becomes the result of suspend inside the fiber.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPSubclass this abstract wrapper and implement accept to select items from the current inner Iterator.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPCalling a generator function creates a suspended iterator.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPCycle a rewindable inner Iterator repeatedly, keeping its keys on every pass.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPInvalidArgumentException is a LogicException that application code can throw when an argument has an inappropriate type.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPDefine a cursor using rewind, valid, current, key and next. foreach rewinds at the start, checks valid before reading and advances after each element. valid must track position independently of the current value so a stored null or false does not terminate traversal.
Intermediate · PHP 8.4; repository runtime, production runtime not attestedPHPGive a collection an external cursor by implementing getIterator(): Traversable.
Intermediate · PHP 8.4; repository runtime, production runtime not attested