note 69800 added to function.str-repeat

From: Date: Thu, 21 Sep 2006 18:22:47 +0000
Subject: note 69800 added to function.str-repeat
Groups: php.notes 
Request: Send a blank email to php-notes+get-117385@lists.php.net to get a copy of this message
Can anyone confirm a length restriction with base64_encode (or possibly with echo)? This works ok for me: <?php echo strlen(str_repeat('-', 3273)); // 3273 echo strlen(base64_encode(str_repeat('-', 3273))); // 4364 echo base64_encode(str_repeat('-', 3273))'; // LS0t repeated ?> But change the length to 3274 and the third echo prints nothing. <?php echo strlen(str_repeat('-', 3274)); // 3274 echo strlen(base64_encode(str_repeat('-', 3274))); // 4368 echo base64_encode(str_repeat('-', 3274))'; // Nothing at all printed ?> This has obvious implications if you're wanting to encode a fairly large serialized array and echo it to a form field. ---- Server IP: 85.116.0.130 Probable Submitter: 84.92.139.196 ---- Manual Page -- http://www.php.net/manual/en/function.str-repeat.php Edit -- https://master.php.net/note/edit/69800 Del: integrated -- https://master.php.net/note/delete/69800/integrated Del: useless -- https://master.php.net/note/delete/69800/useless Del: bad code -- https://master.php.net/note/delete/69800/bad+code Del: spam -- https://master.php.net/note/delete/69800/spam Del: non-english -- https://master.php.net/note/delete/69800/non-english Del: in docs -- https://master.php.net/note/delete/69800/in+docs Del: other reasons-- https://master.php.net/note/delete/69800 Reject -- https://master.php.net/note/reject/69800 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117385) next »