0
unset $arr[$key];

Shouldn't it be :

unset($query[$key]);
user198729
  • 58,910
  • 106
  • 245
  • 345

3 Answers3

3

from the php manual:

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

same with unset.

soulmerge
  • 71,140
  • 18
  • 117
  • 149
Joel L
  • 3,018
  • 1
  • 18
  • 33
1

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?

Community
  • 1
  • 1
meder omuraliev
  • 177,923
  • 69
  • 381
  • 426
1

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

Sean A.O. Harney
  • 23,023
  • 4
  • 28
  • 30