/ Published in: PHP
Expand |
Embed | Plain Text
<? $byteArr = str_split($file); ?>
Comments
Subscribe to comments
You need to login to post a comment.
jodm on 09/04/09
1 person have marked this snippet as a favorite
<? $byteArr = str_split($file); ?>
Subscribe to comments
You need to login to post a comment.
Why just not to use native php functions to apply function for each element of array? It will be way faster (and takes less memory) than foreach.
$file = file_get_contents($_FILES['userfile']['tmp_name']); $byteArr = str_split($file); $byteArr = array_map('ord', $byteArr);@kirik I know this was a while ago, but there isn't any speed difference between foreach and array_map.