]> git.mxchange.org Git - core.git/blobdiff - contrib/lfdb2/read.php
Continued:
[core.git] / contrib / lfdb2 / read.php
index 8779b654ff2e9f4275daa9786726262644d0f841..b68b879bfec82113954fc798f0434c51919efc91 100644 (file)
@@ -14,12 +14,12 @@ $__factor = constant('__FACTOR_32');
 $__format = constant('__FORMAT_READ_32');
 $__step   = constant('__STEP_32');
 
-if ((isset($_SERVER['argv'][1])) && ($_SERVER['argv'][1] == '-64')) {
+if (PHP_INT_SIZE === 8) {
        // Use 64-bit
        $__factor = constant('__FACTOR_64');
        $__format = constant('__FORMAT_READ_64');
        $__step   = constant('__STEP_64');
-} // END - if
+}
 
 $buffer = file_get_contents('test.data.bin' . ($__factor * 2)) or die('Please run write.php first!' . PHP_EOL);
 
@@ -58,13 +58,10 @@ for ($pos = 0; $pos < strlen($buffer); $pos += 8) {
 
                //print 'chr=' . $chr . PHP_EOL;
                $decoded .= chr($chr);
-       } // END - for
-} // END - for
+       }
+}
 
 $decoded = gzuncompress($decoded);
 
 print 'Writing ' . strlen($decoded) . ' bytes to output ...' . PHP_EOL;
 file_put_contents('test.data.out' . ($__factor * 2), $decoded);
-
-// [EOF]
-?>