Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34538 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56670 invoked by uid 1010); 6 Jan 2008 20:04:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56655 invoked from network); 6 Jan 2008 20:04:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2008 20:04:49 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.186 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.198.186 rv-out-0910.google.com Received: from [209.85.198.186] ([209.85.198.186:24858] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/65-16968-D5431874 for ; Sun, 06 Jan 2008 15:04:48 -0500 Received: by rv-out-0910.google.com with SMTP id k15so5747788rvb.23 for ; Sun, 06 Jan 2008 12:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=hdHpbx7u0VbTDJ3TmvTJ3JYFJSbYj9Ow9hHi4NNTAbk=; b=ILlT1l/9OPV/Pzgg2Vd3fVG6vCnMiNTbDtV2jFwxcu4b5CWj8/JIicefXTCPZb9xiYl8VnpAWOVTr5bsWThSN0MBq+FKuGne3EwZBvv02BKNrCoIVOQzHHfXjZcmkzaXD4bIZdKB+giH8xQ3n06/fZ4a4zjWZl285vTBUSm2sKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mbskCKg1Gu7BNFb5APXKoPsS/Q4FnCh/UigyPcdk7u/15Khck7RNkr0DoGAdzxiRGVdtSLi9z5OugmB8RSRb/bnvQsLDBUIlQPdyFl8ieEpdwOLuNdLaZQJsuRDsiZmhYTNfeONY8iqP2ZKgbotHPWEWgCDiTQZF2pHLYEwST54= Received: by 10.142.109.16 with SMTP id h16mr2125239wfc.38.1199649887296; Sun, 06 Jan 2008 12:04:47 -0800 (PST) Received: by 10.142.192.6 with HTTP; Sun, 6 Jan 2008 12:04:47 -0800 (PST) Message-ID: <7f3ed2c30801061204h2c1cf64dwb3a2e207e89e0f9b@mail.gmail.com> Date: Sun, 6 Jan 2008 21:04:47 +0100 To: "Markus Fischer" Cc: "php-dev List" In-Reply-To: <47812E04.3070705@fischer.name> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47812E04.3070705@fischer.name> Subject: Re: [PHP-DEV] Source type.c says settype($var, "double") is deprecated From: hannes.magnusson@gmail.com ("Hannes Magnusson") On Jan 6, 2008 8:37 PM, Markus Fischer 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