Re: note 28315 added to functions.arguments
| From: | Jesus M. Castagnetto | Date: | Thu, 09 Jan 2003 06:00:53 +0000 |
| Subject: | Re: note 28315 added to functions.arguments | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-41883@lists.php.net to get a copy of this message | ||
If the wording in the section "Converting to string"
(part of the description of the string type), about
how numbers get converted to string is not clear, you
can submit a documentation bug.
In view of that documentation, this seems to be the
expected behavior. If you really need the formatting,
either pass a string or use printf().
Will add an editor's note to your submission so others
will use the appropriate approach.
Let me know if you rather see the note removed.
--- pmoulding@tedis.com.au wrote:
> function a($x, $y)
> {
> print($x . ' ' . $y);
> }
> a(2.0, 2.1);
> produces
> 2 2.1
> instead of
> 2.0 2.1
>
> I tried getting the arguements with get_func_arg()
> and type casting and a few other things but all
> produced 2 instead of 2.0. When you need 2.0 as 2.0,
> you have to specify
> a('2.0', 2.1);
> --
> http://www.php.net/manual/en/functions.arguments.php
>
http://master.php.net/manage/user-notes.php?action=edit+28315
>
http://master.php.net/manage/user-notes.php?action=delete+28315
>
http://master.php.net/manage/user-notes.php?action=reject+28315
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com