Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98436 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46090 invoked from network); 8 Mar 2017 18:36:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2017 18:36:54 -0000 X-Host-Fingerprint: 95.148.67.80 unknown Received: from [95.148.67.80] ([95.148.67.80:25179] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/A9-06022-54F40C85 for ; Wed, 08 Mar 2017 13:36:53 -0500 Message-ID: <89.A9.06022.54F40C85@pb1.pair.com> To: internals@lists.php.net References: <8B230568-9074-4928-B9C9-F1F138054CD7@gmail.com> Date: Wed, 8 Mar 2017 18:36:49 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 95.148.67.80 Subject: Re: [PHP-DEV] [Discussion] is_string(), string type and objectsimplementing __toString() From: ajf@ajf.me (Andrea Faulds) 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. -- Andrea Faulds https://ajf.me/