#21537 [Opn->Bgs]: Need function parameters as entered

From: Date: Thu, 09 Jan 2003 06:48:36 +0000
Subject: #21537 [Opn->Bgs]: Need function parameters as entered
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29534@lists.php.net to get a copy of this message
ID: 21537 Updated by: derick@php.net Reported By: pmoulding@tedis.com.au -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: inux, Solaris, NT, Win2000 PHP Version: 4.3.0 New Comment: You must be doing something else wrongly: <?php function foo($a, $b) { var_dump ($a, $b); } foo(1.0, 1.8); ?> [derick@kossu derick]$ php bug21537.php float(1) float(1.8) As you see it works fine... Derick Previous Comments: ------------------------------------------------------------------------ [2003-01-08 22:04:12] pmoulding@tedis.com.au When I write a function as xxx(1.0, 1.8); The function receives 1 and 1.8, not 1.0 and 1.8. I tried get_func_arg() and other tricks but the 1.0 is converted to int(1) before it available for processing. Could we have a language construct named: get_func_arg_untouched_virginal_string_as_entered() which keeps the parameter as a string? I need to keep some numeric data in the original input format so it can be verified as typed and passed to other systems in the original format. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21537&edit=1

« previous php.bugs (#29534) next »