Source type.c says settype($var, "double") is deprecated
| From: | Markus Fischer | Date: | Sun, 06 Jan 2008 19:37:40 +0000 |
| Subject: | Source type.c says settype($var, "double") is deprecated | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-34536@lists.php.net to get a copy of this message | ||
-----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?
All in all a pretty superfluously mail but I thought I bring some
diversification in the type hint debate ;)
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHgS4E1nS0RcInK9ARArFQAKDBW9vqTA9QpA0LIVa/o18gZ1p0wACfQafo
KlyHR+2BYlk2Oj9B8KrQan4=
=vyS0
-----END PGP SIGNATURE-----