What does @ mean?

trying to use session_destroy() but it only works if I put @ in front of it.  What does the @ mean?
LVL 16
rbudjAsked:
Who is Participating?
 
nplibConnect With a Mentor Commented:
suppress error messages.

so my guess it's not working, its just not reporting an error.
0
 
gamebitsConnect With a Mentor Commented:
@ will hide the error if any (will not display it on the page), don't understand why it will make the function work or not though.
0
 
bljakCommented:
Actually, putting @ in front of function only suppresses any error messages if some would occur.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Loganathan NatarajanLAMP DeveloperCommented:
it will hide the ERROR WARNINGS
0
 
ycTINCommented:
@ in PHP is Error Control Operators

before PHP 5 , this is useful for exceptions handling function
 PHP 5 provided the try... catch

Detail :
http://www.php.net/manual/en/language.operators.errorcontrol.php
0
 
rbudjAuthor Commented:
ah,.. ok... i did not actually TEST it to make sure it was working.  No error and I assumed it was working.... basically what I am trying to do is session_destroy() but I got this error:

Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home/advanc8/public_html/chpcomputers/admin/index.php on line 2

I read somewhere else to put the @ in front of session_destroy() but obviously that does not fix the problem.  Ideas?
0
 
nplibConnect With a Mentor Commented:
you need to add
session_start(); before session_destroy();
0
 
rbudjAuthor Commented:
looks like a couple of you answered at the same time so i split points, and nplib solved my problem which should actually been a different question but i assigned points accordingly.  Thanks for the help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.