Language construct

PHP has ‘language construct’, which are special keywords, with an attached feature.

Language constructs are : echo, require, require_once, include, include_once, return, die, exit, unset, isset, print, empty.

Language constructs usually do not require parenthesis, and they are mostly known for that. The parenthesis is not necessary, but possible. It makes the language construct look like a function call.

Also, language construct do not behave like a function, so they can’t be used by their name, as a callback.

There have some special behavior : echo accepts an arbitrary number of argument, while print only accepts one. die and exit work without arguments, but, in the event that an argument is provided, it must be enclosed in parenthesis.

<?php

echo 'a', 'b', 'c';

die;

?>

Documentation

See also PHP Language Constructs vs Built-in Functions

Related : Self, static, parent