Proper way to declare multiple vars in PHP

后端 未结 7 1820
清歌不尽
清歌不尽 2021-01-31 01:48

I\'ve been coding personal scripts for years in PHP and get used to turn off Error display. I\'m about to release some of these scripts and would like to do it the proper way.

相关标签:
7条回答
  • 2021-01-31 02:27

    To fix the issue of

      <?php
      $foo = $bar = $ping = $pong = '';
      ?>
    

    throwing

    Notice: Undefined variable: ...

      <?php
      @$foo = $bar = $ping = $pong = '';
      ?>
    

    It will not fix it but it will not be shown nd will not stop the script from parsing.

    0 讨论(0)
提交回复
热议问题