0
unset $arr[$key];

Shouldn't it be :

unset($query[$key]);
user198729
  • 61,774
  • 108
  • 250
  • 348

3 Answers3

3

from the php manual:

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

same with unset.

soulmerge
  • 73,842
  • 19
  • 118
  • 155
Joel L
  • 3,031
  • 1
  • 20
  • 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
  • 183,342
  • 71
  • 393
  • 434
1

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

Sean A.O. Harney
  • 23,901
  • 4
  • 30
  • 30