Changing for-loops to use pre-calculated values.

Rather than calculating the value each time.
This commit is contained in:
green-ponies (jgen)
2012-01-16 00:07:04 -05:00
parent 8252534cff
commit cd7de93a0a
10 changed files with 44 additions and 23 deletions

View File

@@ -56,7 +56,8 @@ class FlashFileHandler extends DataHandlerExtension {
private function str_to_binarray($string) {
$binary = array();
for($j=0; $j<strlen($string); $j++) {
$length = strlen($string);
for($j=0; $j<$length; $j++) {
$c = ord($string[$j]);
for($i=7; $i>=0; $i--) {
$binary[] = ($c >> $i) & 0x01;