seoyo Posted February 12, 2008 Share Posted February 12, 2008 Hello, I've done some research to find out what significance the @ symbol has in PHP. I haven't found much beyond code snippets. An example of how it's used is as follows: $foo = @require('somefile.php'); What is the @ doing here? Also, how else can it be used? Quote Link to comment https://forums.phpfreaks.com/topic/90797-the-sign-in-php/ Share on other sites More sharing options...
schilly Posted February 12, 2008 Share Posted February 12, 2008 It suppresses error messages if I recall right. Quote Link to comment https://forums.phpfreaks.com/topic/90797-the-sign-in-php/#findComment-465403 Share on other sites More sharing options...
php_dave Posted February 12, 2008 Share Posted February 12, 2008 Schilly is correct it will supress error messages for that command only. Quote Link to comment https://forums.phpfreaks.com/topic/90797-the-sign-in-php/#findComment-465404 Share on other sites More sharing options...
KrisNz Posted February 13, 2008 Share Posted February 13, 2008 Suppressing errors when you require/include will suppress errors for that entire file, i.e if somefile.php has errors, they wont be displayed, regardless of whatever error reporting is set in that file. Use sparingly, if at all. Quote Link to comment https://forums.phpfreaks.com/topic/90797-the-sign-in-php/#findComment-465407 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.