PHP 4.0 Bug #7850: settype() function

From: Date: Thu, 16 Nov 2000 17:55:03 +0000
Subject: PHP 4.0 Bug #7850: settype() function
Groups: php.dev 
Request: Send a blank email to php-dev+get-38363@lists.php.net to get a copy of this message
From: carlos@vlcnet.com.br Operating system: Red Hat Linux 6.2 PHP version: 4.0.0 PHP Bug Type: Unknown/Other Function Bug description: settype() function Please, verify the script below, this error occurred with others values in this variable too. ------------------------------------------------------------ <?php function retorna_cnpj($cnpj) $new_var = ereg_replace("[/\.\-\",$cnpj); $new_var = settype($new_var,"integer"); return $new_var; } $w_cnpj = "12.345.678/0002-12" echo retorna_cnpj($w_cnpj); ?> ------------------------------------------------------------ It must return 12345678000212 as integer, but php return for me the number: 2147483647 Thanks Carlos Portella -- Edit Bug report at: http://bugs.php.net/?id=7850&edit=1

« previous php.dev (#38363) next »