I need to get how much bytes is a decimal integer with php. For example how can I know if 256,379 is 3-bytes with php? I need a php function to pass 256,379 as input and get 3 as output. How can I have it?
2条回答 默认 最新
- dongpuchao1680 2016-01-06 10:12关注
You need calculate logarithm like this:
echo ceil( log ($nmber, 256) );
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报