InvalidArgumentException
InvalidArgumentException is a LogicException that application code can throw when an argument has an inappropriate type.
CKTIS / PHP
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
InvalidArgumentException is a LogicException that application code can throw when an argument has an inappropriate type.
Define 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.
Give a collection an external cursor by implementing getIterator(): Traversable.
Adapt a Traversable source to the Iterator cursor interface.
Catch failures from JSON operations using JSON_THROW_ON_ERROR.
Define the value that json_encode should serialize for an object.
Expose a window of an Iterator by zero-based traversal position, preserving original keys.
LogicException represents a defect in the program’s use of an object or an invariant violation.
Advance several iterators together in rows.
OutOfBoundsException extends RuntimeException for an invalid index or key.
Expose nested arrays through hasChildren and getChildren, one level at a time.
Walk a RecursiveIterator tree without writing a recursive loop.
Inspect a class and create instances with constructor arguments. newInstanceArgs runs the constructor with the supplied arguments, while isInstantiable lets tools reject interfaces or abstract classes first.
Inspect or invoke a named function or Closure.
Inspect a method and invoke it on a compatible receiver.
Read a property declaration and its value on an object.
Select iterated values with a PCRE pattern.
RuntimeException describes a failure discoverable only while the program runs, such as an unexpectedly exhausted input stream.
Maintain a list with insertion and removal at both ends. push and pop operate at the tail; unshift and shift operate at the head. bottom and top inspect the ends without removing them.
Allocate a fixed number of positions indexed from zero.
Extend the abstract heap and compare pairs to define priority.
Keep the greatest value at the top under the default comparison.
Give the smallest value highest extraction priority.
Associate data with object identities and keep a strong reference to each stored key.