Floating point numbers not working with php4 on my linux box.

From: Date: Fri, 23 Jun 2000 17:32:57 +0000
Subject: Floating point numbers not working with php4 on my linux box.
Groups: php.general 
Request: Send a blank email to php-general+get-2832@lists.php.net to get a copy of this message
Hi all, Floating point numbers don't seem to work on my linux box and on the linux box of my ISP (similar config). Everytime I set a variable to a floating point numbers (tried different ways), it's cutted to an integer. I've also copied and pasted examples from the documentation, to be sure I wasn't doing something stupid. The curious fact is that it seems to work nicely on other systems (I've given the same code to a couple of persons on #php channel), and it worked fine on my box when I had PHP3 installed. Example code (from php manual): $var = '122.34343The'; $double_value_of_var = doubleval ($var); print gettype($double_value_of_var) . $double_value_of_var; This should print "double 122.34343", instead it print "double 122". (floating part discarded). The same happens if I use other functions, like "settype", or (double), or whatever you want. I even tried to compile with BCMath support, but nothing changed. I used the following options to configure php: ./configure --enable-bcmath --disable-short-tags --with-mysql --with-pdflib --disable-debug --with-apxs=/usr/sbin/apxs Any help/suggestion is HIGHLY appreciated! Best Regards, -- Federico Pomi http://www.Pomi.net

« previous php.general (#2832) next »