Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / PHP

Knowledge base — PHP

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

Entries: 504

PHP

Keyword try

Enclose operations in an exception-handling region with at least a catch or a finally block.

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

Keyword unset

Remove a variable binding or array entry.

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

Keyword use

Import a name or alias within a namespace at compile time.

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

Keyword var

The historical var property declaration gives the property public visibility.

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

Keyword while

Check the condition before every iteration, including the first.

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

Keyword yield

A function containing yield returns a Generator without running its body immediately.

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

Keyword yield from

Delegate iteration to an array or Traversable, forwarding its keys and values.

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

__call

The public instance method `__call` receives the requested spelling and arguments when an object method is missing or inaccessible in the caller’s scope.

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

__callStatic

The public static method `__callStatic` handles a missing or inaccessible method in a static call.

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

__construct

Creating an instance with new invokes its applicable `__construct` with the supplied arguments.

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

__destruct

The parameterless `__destruct` can release resources when the object has no surviving references or during shutdown.

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

__get

Reading a missing property or one inaccessible in the current scope can invoke the public `__get` with the property name.

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

__invoke

An object with a public `__invoke` method can be used as a callable.

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

__isset

A call to isset or empty on an inaccessible or missing property can invoke public `__isset`.

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

__set

Writing a property that is missing or inaccessible from the caller can invoke public `__set` with its name and assigned value.

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

__toString

Define public `__toString` to supply a string representation during echo, concatenation or an explicit cast.

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

__unset

Calling unset on an inaccessible or missing property can invoke public `__unset` with its name.

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

Sum (+)

The `+` operator adds two numbers, such as the order subtotal and the delivery charge.

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

Sum with assignment (+=)

Add the delivery charge to the order total and store the new amount.

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

Inequality with type conversion (<>)

The angle-bracket spelling produces the same result as `!=`. It returns false for zero and the boolean false because those values are loosely equal.

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

Array union by key (+)

Combine two arrays by key, taking the left value whenever both arrays contain the same key.

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

Value assignment (=)

Assignment stores the value of the right expression in the writable target on the left.

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

Bitwise AND (&)

Extract flags shared by two masks.

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

Bitwise AND with assignment (&=)

Keep in the variable only the flags allowed by the right mask.

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