Logical disjunction (||)
One truthy operand suffices to produce true.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
One truthy operand suffices to produce true.
The word `or` checks the second possibility only when the first is false-like.
Exclusive disjunction returns true exactly when one operand is truthy.
Multiply a unit price by a quantity.
Scale the stored value by the factor on the right.
Read a value when it exists and is not null; otherwise evaluate the fallback.
Initialize a writable target only when it is missing or currently null.
Read a property or invoke a method only if the receiver is not null.
Select an instance property or call an instance method of the object on the left.
Find the remainder when dividing an item count by the package size.
Wrap a nonnegative counter into the index range by storing its remainder modulo the cycle length.
Discard low bits by shifting an integer to the right.
Remove processed low bits from a stored bit field.
Select a class constant, static property or static method through its class scope.
Return the comparison as an integer in a sorting callback. Swapping operands reverses the sort order.
Unpack array elements into an array literal or pass iterable elements as function arguments.
For objects, test whether both variables refer to the same instance. Separate instances with identical properties are distinct.
Distinguish a search result from its failure marker. Strict inequality with false accepts a valid zero result as well.
Subtract the dispatched quantity from the stock level.
Deduct the amount on the right from the balance.
Closure use by reference binds a closure to the outer variable through use (&$count).
Constructor property promotion combines a constructor parameter with a property declaration using a visibility modifier.
A foreach by-reference binding and lingering reference let the loop variable alias each array element in turn, and then the last visited element after a nonempty loop.
Reference assignment (= &) makes two names refer to the same variable.