• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

what does @ do in PHP ?

e.g. in the snippet below.
What is the purpose of the @() around the function call?

It works equally well without the @-brackets enclosing it.

My PHP book has no entry for it, and the search box on php.net doesn't recognise @...
<?php
    if ($size=@(getimagesize('main_YSNS.swf'))) 
	{
        echo 'Width: ', $size[0], ' Height: ', $size[1];
    }  // End if
?>

Open in new window

0
zorba111
Asked:
zorba111
  • 2
1 Solution
 
gamebitsCommented:
Will hide error, if something is wrong with the function without the @ and assuming the php ini file allow it you will see an error message displayed
0
 
zorba111Author Commented:
that's gotta be a record (timewise)!
thanks!
0
 
zorba111Author Commented:
100%
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now