Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 5788

PHP

Logical disjunction (||)

One truthy operand suffices to produce true.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Logical disjunction (or)

The word `or` checks the second possibility only when the first is false-like.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Exclusive disjunction (xor)

Exclusive disjunction returns true exactly when one operand is truthy.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Product (*)

Multiply a unit price by a quantity.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Product with assignment (*=)

Scale the stored value by the factor on the right.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Fallback for null (??)

Read a value when it exists and is not null; otherwise evaluate the fallback.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Conditional default assignment (??=)

Initialize a writable target only when it is missing or currently null.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Null-safe access (?->)

Read a property or invoke a method only if the receiver is not null.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Object member access (->)

Select an instance property or call an instance method of the object on the left.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Integer remainder (%)

Find the remainder when dividing an item count by the package size.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Integer remainder with assignment (%=)

Wrap a nonnegative counter into the index range by storing its remainder modulo the cycle length.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Right shift (>>)

Discard low bits by shifting an integer to the right.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Class scope resolution (::)

Select a class constant, static property or static method through its class scope.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Three-way comparison (<=>)

Return the comparison as an integer in a sorting callback. Swapping operands reverses the sort order.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Element unpacking (...)

Unpack array elements into an array literal or pass iterable elements as function arguments.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Equality of type and value (===)

For objects, test whether both variables refer to the same instance. Separate instances with identical properties are distinct.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Difference in type or value (!==)

Distinguish a search result from its failure marker. Strict inequality with false accepts a valid zero result as well.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Difference (-)

Subtract the dispatched quantity from the stock level.

Basic · PHP 8.4; repository runtime, production runtime not attested
PHP

Closure capture by reference

Closure use by reference binds a closure to the outer variable through use (&$count).

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Constructor property promotion

Constructor property promotion combines a constructor parameter with a property declaration using a visibility modifier.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

References left by foreach

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.

Intermediate · PHP 8.4; repository runtime, production runtime not attested
PHP

Assignment by reference

Reference assignment (= &) makes two names refer to the same variable.

Intermediate · PHP 8.4; repository runtime, production runtime not attested