Skip to content

Instantly share code, notes, and snippets.

@robertbasic
Created January 13, 2014 14:34
Show Gist options
  • Select an option

  • Save robertbasic/8401317 to your computer and use it in GitHub Desktop.

Select an option

Save robertbasic/8401317 to your computer and use it in GitHub Desktop.
php > $x = 3.42 - (3.42 * 0.12);
php > var_dump($x);
float(3.0096)
php > var_dump(var_export($x,true));
string(18) "3.0095999999999998"
php > echo $x;
3.0096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment