• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to prevent float variables displaying as scientific notation when printing [duplicate]

phpfloating-pointtype-conversionprecision


PHP Snippet 1:

$var = number_format((float)-0.00000025478625, 14);
print($var);

PHP Snippet 2:

0.00000000000000000000000040000000000000001539794790

Related Snippets

Parsing JSON File to array in PHP

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Limit of log line written to Apache Errorlog from mod php error_log

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Array to string conversion

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

Class AppHttpControllersUserController Does Not Exist

How to override htaccees file for cache control header

IlluminateDatabaseQueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

PHP Sorting - getting 10, 11, 12 ... 1, 20, 2 rather than 1, 10, 11, 12 ... 2, 20

Display a product custom field only in WooCommerce Admin single orders

Log file is not being written in Laravel 5.5

Laravel 5 session not persisting after user is logged in

enable Apache http Authorization header

About Contact Privacy policy Terms and conditions