The @-Operator

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
titeroy
Forum Newbie
Posts: 8
Joined: Mon Mar 01, 2010 12:21 pm

The @-Operator

Post by titeroy »

Hi, I am new here and hope this is the right bard.
My question is:

What is the difference between
@session_start();
and
session_start();

Actually I am curious what this @-Operator is for.
[Because i could not search for @ I hope this is not a stupid question that has been covered a hundred times b4]
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: The @-Operator

Post by onion2k »

It's the error suppression operator - it means "do this, and if there's an error just ignore it and carry on". My advice is never use it.
titeroy
Forum Newbie
Posts: 8
Joined: Mon Mar 01, 2010 12:21 pm

Re: The @-Operator

Post by titeroy »

TNX 4 the quick response
Post Reply