PHP Classes

Large int (barcode, ean, etc..)

Recommend this page to a friend!

      Simple XLSX  >  All threads  >  Large int (barcode, ean, etc..)  >  (Un) Subscribe thread alerts  
Subject:Large int (barcode, ean, etc..)
Summary:Large int (barcode, ean, etc..)
Author:acido fil
Date:2013-03-07 14:20:57

  1. Large int (barcode, ean, etc..)   Reply   Report abuse  
acido fil - 2013-03-07 14:20:57
At first, let me thank you for a great(and FAST!) xlsx class!!!

However I don't think it's a good idea to convert numeric strings into actual integers. I'd suggest leaving this conversion to developers. Great example is reading of EAN/barcode - it's very long numeric string which php wont convert correctly(integer overflow occurs).

So to anyone which such a issues, just comment out this code:

// Check for numeric values
if (is_numeric($value) && $dataType != 's') {
if ($value == (int)$value) $value = (int)$value;
elseif ($value == (float)$value) $value = (float)$value;
elseif ($value == (double)$value) $value = (double)$value;