PHP functions and @functions

前端 未结 5 1656
南笙
南笙 2020-12-14 16:56

Basically, I\'ve seen people using @ before their function calls, not for every function, but for some kind of extension functions like file_get_contents(

5条回答
  •  臣服心动
    2020-12-14 17:37

    I have similar doubt about @ used in front of functions. To avoid this I made some verification before the function call. My example is:

    if ( is_file($filename) ) $timestamp = filemtime( $filename );

提交回复
热议问题