Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47081 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62737 invoked from network); 2 Mar 2010 08:22:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2010 08:22:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:46820] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/90-58396-FDACC8B4 for ; Tue, 02 Mar 2010 03:22:56 -0500 Received: from [83.228.56.37] (port=1052 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1NmNNU-00022K-6N; Tue, 02 Mar 2010 02:22:52 -0600 Message-ID: <2C826D99CC464F00A1854BBEB6EE13DA@pc> To: "Antony Dovgal" , References: <3B776C158D8E4D8D8DEB11A9860B6734@pc> <4B8C3F45.2080502@daylessday.org> Date: Tue, 2 Mar 2010 10:22:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1251"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Scary note for gettype() in docs From: sv_forums@fmethod.com ("Stan Vassilev") > On 03/01/2010 11:35 PM, Stan Vassilev wrote: >> >> Hi, >> >> The gettype() documentation warns people that the returned string is >> "subject to change". >> Why is there a function that's subject to change in the API? > > Because life is complicated. > Because gettype("test") returns "string" in 5.x and "unicode" in 6.0. > > What exactly are you trying to fix? And what exactly are you proposing? If I have to propose anything, that'd be for 6.0 unicode strings to return "string" and binary strings to return "binary", as that is more apt for the real-world use cases people will find themselves in (and migrating code will be easier). A PHP user stumbled onto the "subject to change" note and asked if it's safe to use. If differentiating both types of strings in 6.0 is what was intended, then it's perfectly safe to use, and I'll probably file an issue with docs to be more clear about the actual situation. Regards, Stan Vassilev