note 106615 added to language.operators.increment

From: Date: Tue, 22 Nov 2011 12:05:09 +0000
Subject: note 106615 added to language.operators.increment
Groups: php.notes 
Request: Send a blank email to php-notes+get-184620@lists.php.net to get a copy of this message
If you have a trailing zero and use the increment, the trailing zero will not remain. Was at least unexpected for me at first, although it's logical if you think about it. <?php $start = '01'; $start++; print $start; //Outputs '2' not '02' ?> ---- Server IP: 69.147.83.197 Probable Submitter: 78.43.204.194 ---- Manual Page -- http://www.php.net/manual/en/language.operators.increment.php Edit -- https://master.php.net/note/edit/106615 Del: integrated -- https://master.php.net/note/delete/106615/integrated Del: useless -- https://master.php.net/note/delete/106615/useless Del: bad code -- https://master.php.net/note/delete/106615/bad+code Del: spam -- https://master.php.net/note/delete/106615/spam Del: non-english -- https://master.php.net/note/delete/106615/non-english Del: in docs -- https://master.php.net/note/delete/106615/in+docs Del: other reasons-- https://master.php.net/note/delete/106615 Reject -- https://master.php.net/note/reject/106615 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184620) next »