AppendIterator
Chain Iterator instances in append order without concatenating their arrays.
CKTIS / PHP
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Chain Iterator instances in append order without concatenating their arrays.
ArgumentCountError extends TypeError.
Implement offsetExists, offsetGet, offsetSet and offsetUnset to define bracket operations on an object.
Wrap 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.
AssertionError is an Error raised for a false executed assertion when assertion exceptions are enabled.
BadMethodCallException specializes BadFunctionCallException for invalid method calls.
Wrap an Iterator with one-element lookahead. hasNext reports whether another item follows the current one, useful for separators without trailing punctuation.
Filter an Iterator lazily by invoking a callback with the current value, key and inner iterator.
An anonymous or arrow function is a Closure object. fromCallable creates one from a callable in the current visibility scope.
Supply count(): int so the global count function can ask an object for its size.
Represent calendar instructions such as one month or a duration such as thirty days.
Iterate recurring dates without building the whole list.
Represent a mutable date and time.
Keep an original date while deriving adjusted dates.
Use 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.
DivisionByZeroError is an ArithmeticError raised by division or remainder with a zero divisor in PHP 8.4, including intdiv.
DomainException is a LogicException for a value outside an operation’s defined domain.
Provide 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.
Error is the base of PHP engine error objects such as TypeError and ValueError.
Represent an exceptional application condition with a message, integer code and optional previous Throwable.
Suspend 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.
Subclass this abstract wrapper and implement accept to select items from the current inner Iterator.
Calling a generator function creates a suspended iterator.
Cycle a rewindable inner Iterator repeatedly, keeping its keys on every pass.