note 112923 added to language.operators.errorcontrol

From: Date: Wed, 07 Aug 2013 16:38:45 +0000
Subject: note 112923 added to language.operators.errorcontrol
Groups: php.notes 
Request: Send a blank email to php-notes+get-195903@lists.php.net to get a copy of this message
Although I'd highly advise that you avoid the @ operator whenever possible (since you really should foolproof your software, not just hide its problems), there are some instances when it comes in handy. For example, since prior to PHP 5.4, there was no perfect way to determine if the session has already been started, I now always use <?php @session_start(); ?> to start it. For instance, I've written two programs for different purposes and combined them into one project. They both start the session. But if session_start() is called when the session is already active, an E_NOTICE level error is generated. ---- Server IP: 69.147.83.199 Probable Submitter: 68.14.223.28 ---- Manual Page -- http://php.net/manual/en/language.operators.errorcontrol.php Edit -- https://master.php.net/note/edit/112923 Del: integrated -- https://master.php.net/note/delete/112923/integrated Del: useless -- https://master.php.net/note/delete/112923/useless Del: bad code -- https://master.php.net/note/delete/112923/bad+code Del: spam -- https://master.php.net/note/delete/112923/spam Del: non-english -- https://master.php.net/note/delete/112923/non-english Del: in docs -- https://master.php.net/note/delete/112923/in+docs Del: other reasons-- https://master.php.net/note/delete/112923 Reject -- https://master.php.net/note/reject/112923 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195903) next »