thompsma Posted September 5, 2007 Share Posted September 5, 2007 I am pretty new to PHP (recovering ASP programmer . I have come across a sample of code that I need help with. The code: while (@!$handle = fopen($dirpath."/".$filename, "x+")) { $filename = random(.".".$fileext; } The snippet works perfectly, but I am trying to understand the syntax. What does the "@!" mean? Quote Link to comment https://forums.phpfreaks.com/topic/68063-solved-php-syntax-help/ Share on other sites More sharing options...
lemmin Posted September 5, 2007 Share Posted September 5, 2007 The @ hides any errors or warnings it might return and the ! changes the if to an if not. Quote Link to comment https://forums.phpfreaks.com/topic/68063-solved-php-syntax-help/#findComment-342124 Share on other sites More sharing options...
thompsma Posted September 5, 2007 Author Share Posted September 5, 2007 Outstanding. Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/68063-solved-php-syntax-help/#findComment-342128 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.