Bug #17772 Updated: array_merge() throws warning when supplied with 1 argument only

From: Date: Mon, 15 Jul 2002 13:02:44 +0000
Subject: Bug #17772 Updated: array_merge() throws warning when supplied with 1 argument only
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14201@lists.php.net to get a copy of this message
ID: 17772 Updated by: carlos@wfmh.org.pl -Summary: round() not rounds as expected Reported By: carlos@wfmh.org.pl Status: Bogus Bug Type: *Math Functions Operating System: Linux GNU/Debian PHP Version: 4.1.2 New Comment: So it's rather Makefile issue? Or it shall be reported to Debian package maintainer then? Previous Comments: ------------------------------------------------------------------------ [2002-07-15 08:54:51] george@intellnet.net.uk No, This is a platform specific build/optimization issue not a float precision "bogus bug". Compile ext/standard/math.c without optimization i.e. with -O0 instead of -O2, and the bug vanishes: gcc -I. -I/home/george/php-4.2.1/ext/standard -I/home/george/php-4.2.1/main -I/home/george/php-4.2.1 -I/home/george/php-4.2.1/Zend -I/home/george/php-4.2.1/ext/mysql/libmysql -I/home/george/php-4.2.1/ext/xml/expat -I/home/george/php-4.2.1/TSRM -g -O0 -c math.c && touch math.lo (php 4.1.2 i386-pc-linux-gnu Debian Linux test 2.2.18pre21) I believe BSD always works. For an even simpler test case, try round(0.35,1); George ------------------------------------------------------------------------ [2002-06-15 12:52:02] hholzgra@php.net see the note on float precision on http://www.php.net/manual/en/language.types.float.php ------------------------------------------------------------------------ [2002-06-15 10:10:50] carlos@wfmh.org.pl round(12.555, 2) produces 12.55 not 12.56 as is documented (and as it should). round(12.556, 2) works fine thou. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17772&edit=1

« previous php.bugs (#14201) next »