user198729
user198729

Reputation: 63636

What's the term for calling a function this way?

unset $arr[$key];

Shouldn't it be :

unset($query[$key]);

Upvotes: 0

Views: 79

Answers (3)

Joel
Joel

Reputation: 3060

from the php manual:

echo is not actually a function (it is a language construct)

same with unset.

Upvotes: 3

Sean A.O. Harney
Sean A.O. Harney

Reputation: 24497

isset and unset are actually implemented as PHP unary operators also, so they can be used without parens.

Upvotes: 1

meder omuraliev
meder omuraliev

Reputation: 186562

If I understand you correctly then it would be called a language construct, such as echo.

What is the difference between a language construct and a "built-in" function in PHP?

Upvotes: 1

Related Questions