PHP Tutorial Tutorials - PHP Error Control Operators

PHP Error Control Operators

The error control operator@ is used to prepend to an expression or function,
It will ignore all error messages generated by the expression or function.

<?php
$handle = fopen("c:\\test.txt", "r");
// Warning: fopen(c:\test.txt): failed to open stream: No such file or directory

$handle = @fopen("c:\\test.txt", "r");
var_dump($handle); // false
?> 
Date:2019-10-01 02:23:16 From:www.Lautturi.com author:Lautturi