#19961 [Opn->Fbk]: Random casting results when Java ext is used

From: Date: Thu, 17 Oct 2002 22:06:01 +0000
Subject: #19961 [Opn->Fbk]: Random casting results when Java ext is used
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22697@lists.php.net to get a copy of this message
ID: 19961 Updated by: sniper@php.net Reported By: kryza@medialogic.it -Status: Open +Status: Feedback Bug Type: Java related Operating System: Linux 2.4.18 (Red Hat 7.3) PHP Version: 4.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-10-17 14:18:30] kryza@medialogic.it Well, "new Java()" switch delimiter from dot (.) to comma (,) Grzegorz Kryza ------------------------------------------------------------------------ [2002-10-17 12:41:38] kryza@medialogic.it PHP 4.2.3 compiled with Sun JDK 1.3.1 Script like this: $var_a="10.10"; echo "A: "; var_dump($var_a); $var_b=(float)$var_a; echo "A: "; var_dump($var_b); Normaly gives this result: A: string(5) "10.10" B: float(10.1) But when in the same file we create java object: $var_a="10.10"; echo "A: "; var_dump($var_a); $var_b=(float)$var_a; echo "A: "; var_dump($var_b); $system = new Java('java.lang.System'); Output can be: A: string(5) "10.10" B: float(10) or like before: A: string(5) "10.10" B: float(10.1) Strange. Grzegorz Kryza ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19961&edit=1

« previous php.bugs (#22697) next »