note 89637 added to language.types.type-juggling

From: Date: Tue, 17 Mar 2009 16:04:31 +0000
Subject: note 89637 added to language.types.type-juggling
Groups: php.notes 
Request: Send a blank email to php-notes+get-152049@lists.php.net to get a copy of this message
It seems (unset) is pretty useless. But for people who like to make their code really compact (and probably unreadable). You can use it to use an variable and unset it on the same line: Without cast: <?php $hello = 'Hello world'; print $hello; unset($hello); ?> With the unset cast: <?php $hello = 'Hello world'; $hello = (unset) print $hello; ?> Hoorah, we lost another line! ---- Server IP: 83.137.20.135 Probable Submitter: 92.65.202.85 ---- Manual Page -- http://www.php.net/manual/en/language.types.type-juggling.php Edit -- https://master.php.net/note/edit/89637 Del: integrated -- https://master.php.net/note/delete/89637/integrated Del: useless -- https://master.php.net/note/delete/89637/useless Del: bad code -- https://master.php.net/note/delete/89637/bad+code Del: spam -- https://master.php.net/note/delete/89637/spam Del: non-english -- https://master.php.net/note/delete/89637/non-english Del: in docs -- https://master.php.net/note/delete/89637/in+docs Del: other reasons-- https://master.php.net/note/delete/89637 Reject -- https://master.php.net/note/reject/89637 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152049) next »