note 89848 added to function.substr-replace

From: Date: Wed, 25 Mar 2009 18:58:56 +0000
Subject: note 89848 added to function.substr-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-152446@lists.php.net to get a copy of this message
I've just taken a look at the post by ntoniazzi and I have a very small correction to make. In the second if statement, it should be a triple equals, so: <?php if ($length === null) ?> It requires the triple equals, for the case of pure insertion, where $length = 0, the double equals, will catch this, causing the string to be cut short. I hope this helps someone. ---- Server IP: 92.48.74.199 Probable Submitter: 87.113.30.215 ---- Manual Page -- http://www.php.net/manual/en/function.substr-replace.php Edit -- https://master.php.net/note/edit/89848 Del: integrated -- https://master.php.net/note/delete/89848/integrated Del: useless -- https://master.php.net/note/delete/89848/useless Del: bad code -- https://master.php.net/note/delete/89848/bad+code Del: spam -- https://master.php.net/note/delete/89848/spam Del: non-english -- https://master.php.net/note/delete/89848/non-english Del: in docs -- https://master.php.net/note/delete/89848/in+docs Del: other reasons-- https://master.php.net/note/delete/89848 Reject -- https://master.php.net/note/reject/89848 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152446) next »