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 declare

Set a compilation or execution directive for the file or supported block. strict_types must appear at the start of the file and makes ordinary scalar argument checks depend on the calling file.

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

Keyword default

Define the fallback entry point of a switch when no case matches.

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

Keyword die

This alias of exit terminates the entire script.

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

Keyword do

Execute a loop body before testing its condition, guaranteeing one pass unless control transfers out earlier.

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

echo: writing text to output

echo sends values to program output. It is a language construct rather than an ordinary function and provides no result to assign.

Basic · PHP 8.4
PHP

Keyword else

Run the alternative branch only when the associated if or preceding elseif tests fail.

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

Keyword elseif

Test another condition only after earlier branches failed.

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

Keyword empty

Test whether an expression is absent or converts to false.

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

Keyword enddeclare

Terminate a colon-style declare block.

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

Keyword endfor

Close a colon-style for body, commonly around template output.

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

Keyword endforeach

End a colon-style foreach block in a template or PHP file.

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

Keyword endif

Close the complete colon-style conditional, including any elseif and else branches.

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

Keyword endswitch

Close the alternative syntax of switch.

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

Keyword endwhile

Close a colon-style while loop.

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

Keyword enum

Define a closed set of singleton cases.

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

Keyword eval

Execute PHP source text in the variable scope of the call.

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

Keyword exit

Stop the script with an integer process status or print a string and stop with status zero.

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

Keyword extends

A class extends one immediate parent and inherits its accessible implementation.

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

Keyword final

A final class rejects subclasses and a final method rejects overriding in a subclass.

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

Keyword finally

Run cleanup after a try or catch during normal completion, return or exception unwinding.

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

Keyword fn

Create a Closure with a single expression whose value is returned.

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

Keyword for

Evaluate initialization once, test the middle expression before each pass, and run the update after the body. continue still runs the update, while break exits without it.

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

Keyword foreach

Traverse arrays and iterable objects using their keys and values.

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

Keyword function

Declare a named function with parameters, an optional return type and a body.

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