¡@

Home 

php Programming Glossary: sunit

PHP convert KB MB GB TB etc to Bytes

http://stackoverflow.com/questions/11807115/php-convert-kb-mb-gb-tb-etc-to-bytes

0 'KB' 1 'MB' 2 'GB' 3 'TB' 4 'PB' 5 'EB' 6 'ZB' 7 'YB' 8 sUnit strtoupper trim substr p_sFormatted 2 if intval sUnit 0 sUnit.. 8 sUnit strtoupper trim substr p_sFormatted 2 if intval sUnit 0 sUnit 'B' if in_array sUnit array_keys aUnits return false.. strtoupper trim substr p_sFormatted 2 if intval sUnit 0 sUnit 'B' if in_array sUnit array_keys aUnits return false iUnits..

date / time convert to time since php

http://stackoverflow.com/questions/2952361/date-time-convert-to-time-since-php

iTime1 iTime0 if iTimeElapsed 60 iNum intval iTimeElapsed sUnit second else if iTimeElapsed 60 60 iNum intval iTimeElapsed 60.. else if iTimeElapsed 60 60 iNum intval iTimeElapsed 60 sUnit minute else if iTimeElapsed 24 60 60 iNum intval iTimeElapsed.. if iTimeElapsed 24 60 60 iNum intval iTimeElapsed 60 60 sUnit hour else if iTimeElapsed 30 24 60 60 iNum intval iTimeElapsed..