Why does the gettype() say it's a double but var_dump() says float?

Why does the gettype() say it's a double but var_dump() says float?

$number = 1234567890123456789;
echo "Number: {$number} is a ". gettype($number) . "\n";
var_dump($number);

Response:

Number: 1.23456789012E+18 is a double float(1.23456789012E+18)

Answers


They're the same thing http://php.net/manual/en/language.types.float.php


Need Your Help

REST: best practice for publishing data model

api rest data-structures avro

What are some best practices to publish the data model of a REST API?

Is there a weak/soft bidirectional Map in Java?

java data-structures weak-references bimap

I would like a "symbol alphabet" to have a bi-directional map with weak/soft references. Something like an Apache's Common BidiMap (or Guava's BiMap) with a WeakMap-like interface.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.