What does "@" mean before a variable in PHP?

Asked

Viewed 54 times

1

I’m looking at a code and I came across the following:

$dom = new DOMDocument;
@$dom->loadHTML($html);

I thought @ was a mistyping, but when I remove the arroba I get a Warning:

Domdocument::loadHTML(): htmlParseEntityRef: no name in Entity

I’m looking in the manual, but I can’t find anything. What does this arroba do? And what’s his technical name?

  • 1

    It deletes the warnings, so when you use it the Warning is not displayed.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.