Very short trick: avoid error message in PHP

Wednesday, October 8, 2008

If we do not want a PHP function issues any error or warning, just enter the first call to the character snail - or at - (@):

PHP:
  1. / / Instead of using the canonical form
  2. miaFunc ( ) ; $ res = miaFunc ();
  3. / / You can use
  4. miaFunc ( ) ; $ res = @ miaFunc ();

Related Post

Was this article helpful?: Per nientePocoAbbastanzaMoltoMoltissimo
Loading ... Loading ...

One comment to "Very short trick: avoid error message in PHP"

  1. getAvatar 1.0
    October 10, 2008 Nicola Ballotta:

    I finally understood something that I wondered for a while 'time P

Leave a comment

TAG XHTML PERMISSIONS: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> INSERTION CODE:
 <pre></pre>         // blocco generico [code][/code]       // blocco generico [as][/as]           // Actionscript [css][/css]         // CSS Style Sheet [html][/html]       // HTML [js][/js]           // Javascript [objc][/objc]       // Objective-C [php][/php]         // PHP [sql][/sql]         // SQL