| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2009-05-09 20:51 UTC] b at ssel dot me
 Description:
------------
for some reason when using mb_substr or mb_convert_encoding php page dies without any error even when error reporting is set to 
error_reporting(E_ALL);
that will happen only if we changed php.ini settings to:
upload_max_filesize: 10M
post_max_size: 10M
max_execution_time:120
max_input_time: -1
I don't think those settings are related to mb_substr, but that what was happening on php 5.2.5 and still happening on 5.2.9
Reproduce code:
---------------
$intsub = mb_substr($intwalker[0], 0, 200);
 if ($intsub != $intwalker[0]){
  $intsub = $intsub." ......";
 }
}
$intsub = mb_convert_encoding($intsub, "utf8", "auto");
Expected result:
----------------
to see a text of the only 200 first chars of $intwalker[0]
Actual result:
--------------
nothing, just a white page no errors at all even if 
error_reporting(E_ALL);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
<?php $data = "test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here "; intsub = mb_substr($data, 0, 200); if ($intsub != $data){ $intsub = $intsub." ......"; } $intsub = mb_convert_encoding($intsub, "utf8", "auto"); echo $intsub; ?>