small-float-num-demo - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of small-float-num-demo.php

  1. <?php
  2. // Primer kako se ponaša PHP - već za brojeve manje od 0.0001, prebacuje ih u E notation
  3.  
  4. $small4dec = 0.0001;
  5. $small5dec = 0.00001;
  6. $small6dec = 0.000001;
  7.  
  8. $smallStr4 = (string)$small4dec;
  9. $smallStr5 = (string)$small5dec;
  10. $smallStr6 = (string)$small6dec;
  11.  
  12. var_dump($small4dec);
  13. var_dump($small5dec);
  14. var_dump($small6dec);
  15.  
  16. var_dump($smallStr4);
  17. var_dump($smallStr5);
  18. var_dump($smallStr6);
  19.  
File Description
  • small-float-num-demo
  • PHP Code
  • 06 Jan-2021
  • 398 Bytes
You can Share it: