note 92685 added to language.operators.comparison

From: Date: Tue, 04 Aug 2009 05:44:12 +0000
Subject: note 92685 added to language.operators.comparison
Groups: php.notes 
Request: Send a blank email to php-notes+get-159072@lists.php.net to get a copy of this message
Note: The ternary shortcut currently seems to be of no use in dealing with unexisting keys in an array, as PHP will throw an error. Take the following example. <?php $_POST['Unexisting'] = $_POST['Unexisting'] ?: false; ?> PHP will throw an error that the "Unexisting" key does not exist. The @ operator does not work here to suppress this error. ---- Server IP: 69.147.83.197 Probable Submitter: 75.71.216.105 ---- Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php Edit -- https://master.php.net/note/edit/92685 Del: integrated -- https://master.php.net/note/delete/92685/integrated Del: useless -- https://master.php.net/note/delete/92685/useless Del: bad code -- https://master.php.net/note/delete/92685/bad+code Del: spam -- https://master.php.net/note/delete/92685/spam Del: non-english -- https://master.php.net/note/delete/92685/non-english Del: in docs -- https://master.php.net/note/delete/92685/in+docs Del: other reasons-- https://master.php.net/note/delete/92685 Reject -- https://master.php.net/note/reject/92685 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159072) next »