note 83055 deleted from reserved.constants by googleguy

From: Date: Fri, 12 Oct 2012 07:34:27 +0000
Subject: note 83055 deleted from reserved.constants by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191263@lists.php.net to get a copy of this message
Note Submitter: isonomia ---- As PHP_INT_MAX is only available since PHP 4.4.0 and PHP 5.0.5 here is a function that should enable sensible values on most machines (16,32 & 64bit):- <?php function get_int_max() { $max=0x7fff; $probe = 0x7fffffff; while ($max == ($probe>>16)) { $max = $probe; $probe = ($probe << 16) + 0xffff; } return $max; } if (!defined('PHP_INT_MAX')) { define ('PHP_INT_MAX', get_int_max()); } define ('PHP_INT_MIN', (int)(PHP_INT_MAX+1)); ?>

« previous php.notes (#191263) next »