Skip to content

Instantly share code, notes, and snippets.

@baijian
Last active December 20, 2015 06:39
Show Gist options
  • Save baijian/6087503 to your computer and use it in GitHub Desktop.
Save baijian/6087503 to your computer and use it in GitHub Desktop.
the number of significant digits displayed in floating point numbers.
precision = 14|12
当float超过14|12位时会自动用科学计数法表示,所以需要用$num = springf("%.0f", $number)
microtime()=>return a string
microtime(true)=>return a float
echo sprintf("$.0f", $microtime() * 1000000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment