note 105905 added to function.chr
| From: | robinleffmann at osu1 dot php dot net | Date: | Sat, 24 Sep 2011 15:46:14 +0000 |
| Subject: | note 105905 added to function.chr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183403@lists.php.net to get a copy of this message | ||
While the documentation appears to imply ASCII character operation only, chr() can actually be used
to convert arbitrary byte values into binary content:
<?php
while( @$i++ < 32 )
$a = chr( mt_rand(0, 255) );
file_put_contents( 'filename', $a );
?>
----
Server IP: 80.67.10.228
Probable Submitter: 83.227.160.33
----
Manual Page -- http://www.php.net/manual/en/function.chr.php
Edit -- https://master.php.net/note/edit/105905
Del: integrated -- https://master.php.net/note/delete/105905/integrated
Del: useless -- https://master.php.net/note/delete/105905/useless
Del: bad code -- https://master.php.net/note/delete/105905/bad+code
Del: spam -- https://master.php.net/note/delete/105905/spam
Del: non-english -- https://master.php.net/note/delete/105905/non-english
Del: in docs -- https://master.php.net/note/delete/105905/in+docs
Del: other reasons-- https://master.php.net/note/delete/105905
Reject -- https://master.php.net/note/reject/105905
Search -- https://master.php.net/manage/user-notes.php