note 91378 added to language.operators.assignment

From: Date: Tue, 09 Jun 2009 11:16:43 +0000
Subject: note 91378 added to language.operators.assignment
Groups: php.notes 
Request: Send a blank email to php-notes+get-156586@lists.php.net to get a copy of this message
Pay attention that combined operators affect not only variable value, but also its type: <?php $a = "45"; var_dump($a); echo "<br/>"; $a += 5; var_dump($a); echo "<br/>"; echo "<br/>"; $b = 56; var_dump($b); echo "<br/>"; $b .= "qweasd"; var_dump($b); echo "<br/>"; ?> Outputs: string(2) "45" int(50) int(56) string(8) "56qweasd" ---- Server IP: 69.147.83.197 Probable Submitter: 217.77.54.14 ---- Manual Page -- http://www.php.net/manual/en/language.operators.assignment.php Edit -- https://master.php.net/note/edit/91378 Del: integrated -- https://master.php.net/note/delete/91378/integrated Del: useless -- https://master.php.net/note/delete/91378/useless Del: bad code -- https://master.php.net/note/delete/91378/bad+code Del: spam -- https://master.php.net/note/delete/91378/spam Del: non-english -- https://master.php.net/note/delete/91378/non-english Del: in docs -- https://master.php.net/note/delete/91378/in+docs Del: other reasons-- https://master.php.net/note/delete/91378 Reject -- https://master.php.net/note/reject/91378 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#156586) next »