On Jan 6, 2008 8:37 PM, Markus Fischer <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > accidentally I came across settype() in ext/standard/type.c which says > > ~ } else if (!strcasecmp(new_type, "float")) { > ~ convert_to_double(*var); > ~ } else if (!strcasecmp(new_type, "double")) { /* deprecated */ > ~ convert_to_double(*var); > > This is the context of calling > > ~ settype($val, "double"); > > I don't understand the comment, because in gettype() there is > > ~ case IS_DOUBLE: > ~ RETVAL_ASCII_STRING("double", 1); > ~ break; > > There's no possibility that gettype() returns "float", so maybe this > comment is just in the wrong line?
No, the comment is correct. "for historical [read: BC] reasons "double" is returned in case of a float, and not simply "float"" See http://docs.php.net/settype && http://docs.php.net/gettype -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php