Jump to content


Photo

@ on a function name


  • Please log in to reply
1 reply to this topic

#1 utahcon

utahcon
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 14 September 2006 - 07:53 PM

I have seen in some code I am looking at the @ symbol before the function name.

What is the purpose of this?

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 14 September 2006 - 08:00 PM

It stops errors being reported if something goes pear-shaped.

Use with care, and only if you are handling error situations yourself, otherwise you won't know when and why something isn't working.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users