note 69800 deleted from function.str-repeat by bobby

From: Date: Thu, 21 Sep 2006 18:30:40 +0000
Subject: note 69800 deleted from function.str-repeat by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-117388@lists.php.net to get a copy of this message
Note Submitter: php at NOSPAMianco dot co dot uk ---- 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.

« previous php.notes (#117388) next »