|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-03-14 20:59 UTC] danack@php.net
[2016-03-15 04:47 UTC] patrick at patrickmcdougle dot com
[2016-03-15 13:16 UTC] danack@php.net
-Status: Open
+Status: Not a bug
[2016-03-15 13:16 UTC] danack@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 17:00:01 2025 UTC |
Description: ------------ Assigning a variable the PHP_INT_MIN literal to a variable results in a double instead of an integer. I would expect the min representable integer to remain an integer. See below. Test script: --------------- vagrant@vagrant-ubuntu-trusty-64:~$ php -v PHP 7.0.4-1+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies vagrant@vagrant-ubuntu-trusty-64:~$ php -a Interactive mode enabled php > echo PHP_INT_MIN; -9223372036854775808 php > $foo = -9223372036854775808; php > print_r($foo); -9.2233720368548E+18 php > echo gettype($foo); double php > $foo = -9223372036854775807; php > print_r($foo); -9223372036854775807 php > echo gettype($foo); integer