Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the use of @ in php?



What is the use of @ in php?..

Answer / Mohit Dwivedi

The `@` symbol in PHP is used for error suppression. When prefixed to a function call, it suppresses any errors that might be thrown by that function. Here's an example:

```php
$file = '@/path/to/nonexistent_file.txt';
$contents = file_get_contents($file); // This will not throw an error if the file does not exist
echo $contents; // Output: null (empty string if using output buffering)
```
It's important to note that suppressing errors can make debugging more difficult, as you won't see the actual errors that occur. It should be used sparingly and with caution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What does php mean?

1 Answers  


How do you achieve page caching in PHP?

3 Answers  


How to call javascript function in php without any event?

1 Answers  


How to remove white spaces from the beginning and/or the end of a string in php?

1 Answers  


Tell me what are magic methods?

1 Answers  


What is the integer?

1 Answers  


What the difference between WAMP5 1.7.3 and WampServer 2?

3 Answers  


Which parts of php are case sensitive?

1 Answers  


What is pdo classes?

1 Answers  


Tell me how to create a session? How to set a value in session? How to remove data from a session?

1 Answers  


Tell me what is htaccess? Why do we use this and where?

0 Answers  


how can i find number of rows in a table using MS Access and php? i used odbc_num_rows($query); but it returned -1.

1 Answers  


Categories