Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98437 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47493 invoked from network); 8 Mar 2017 18:39:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2017 18:39:59 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.86 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.86 mx105.easyname.com Received: from [77.244.243.86] ([77.244.243.86:54868] helo=mx105.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/F9-06022-DFF40C85 for ; Wed, 08 Mar 2017 13:39:58 -0500 Received: from cable-81-173-135-7.netcologne.de ([81.173.135.7] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1clgV7-0006a4-PB; Wed, 08 Mar 2017 18:39:55 +0000 Reply-To: internals@lists.php.net References: <8B230568-9074-4928-B9C9-F1F138054CD7@gmail.com> <89.A9.06022.54F40C85@pb1.pair.com> To: Andrea Faulds , internals@lists.php.net Message-ID: Date: Wed, 8 Mar 2017 19:39:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <89.A9.06022.54F40C85@pb1.pair.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] [Discussion] is_string(), string type and objectsimplementing __toString() From: php@fleshgrinder.com (Fleshgrinder) On 3/8/2017 7:36 PM, Andrea Faulds wrote: > Hi, > > Andrey Andreev wrote: >> The question is rather "is this value a string?", only with the added >> assumption that __toString() objects are treated as "string objects" >> and thus fulfill the condition (another reason why I went for an >> is_string() parameter). > > This is a faulty assumption. The presence of __toString() doesn't mean > the object is a string, or intended to be used like one. > What is it then in your book? -- Richard "Fleshgrinder" Fussenegger