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? 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. 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! Link to comment https://forums.phpfreaks.com/topic/68063-solved-php-syntax-help/#findComment-342128 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.