Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Functions beginning with @

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Functions beginning with @

Postby Parrot » Mon Oct 01, 2012 10:22 pm

I've run across some PHP code that is written in a way I've never seen before. Some of the functions are preceded by @, for example:

$fp=@fsockopen($host,80,$errno,$errstr,10);

What does it mean to write it that way?
Parrot
New php-forum User
New php-forum User
 
Posts: 9
Joined: Mon Oct 01, 2012 10:17 pm

Re: Functions beginning with @

Postby egami » Tue Oct 02, 2012 7:26 am

@ supresses any errors that may occur.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron