note 104805 added to function.substr

From: Date: Fri, 08 Jul 2011 08:07:19 +0000
Subject: note 104805 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-181344@lists.php.net to get a copy of this message
When using a value of a wrong type as second parameter , substr() does not return FALSE but NULL although the docs say, it should return FALSE on error. Prior to PHP 5.3, substr() tries to cast the second parameter to int and doesn't throw any errors. Since PHP 5.3 a warning is thrown. ---- Server IP: 212.124.37.9 Probable Submitter: 217.66.60.14 ---- Manual Page -- http://www.php.net/manual/en/function.substr.php Edit -- https://master.php.net/note/edit/104805 Del: integrated -- https://master.php.net/note/delete/104805/integrated Del: useless -- https://master.php.net/note/delete/104805/useless Del: bad code -- https://master.php.net/note/delete/104805/bad+code Del: spam -- https://master.php.net/note/delete/104805/spam Del: non-english -- https://master.php.net/note/delete/104805/non-english Del: in docs -- https://master.php.net/note/delete/104805/in+docs Del: other reasons-- https://master.php.net/note/delete/104805 Reject -- https://master.php.net/note/reject/104805 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181344) next »