Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98474 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11920 invoked from network); 10 Mar 2017 18:27:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Mar 2017 18:27:42 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.174 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.128.174 mail-wr0-f174.google.com Received: from [209.85.128.174] ([209.85.128.174:36639] helo=mail-wr0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/40-08615-C10F2C85 for ; Fri, 10 Mar 2017 13:27:41 -0500 Received: by mail-wr0-f174.google.com with SMTP id u108so69950036wrb.3 for ; Fri, 10 Mar 2017 10:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:cc:from:message-id; bh=HWQTGr8bhs++B//bFQofbUNpl1HPAp+YLn0Y7pPKNIQ=; b=RLIQkV8+XvKn42hiVt9mC4TMYiaBS7gXOajnjjmfNjIhCB29dOIjqov7wBa2tVCb0I Y4ZxdlrQueM2rnSYd+hCTSSEemru0Hj1DQme3drpIgvWwWoIHitZgKgt5zZsRUEVjWOB l3gu9vsAjrvO0y5OnRJZAdcMJkgb2e7BJPEPR5eCckUdKgUdao/RnVHxiBE2/N8AQlgx piurCmomHAbzDB02Ie8VX6DjJKRlwtjR3+xNVu0Zb2kUwHaVH6BKVV53QFdNn6UN2Vxn 0OC2A7xWQtrxaaxXSX8yUaUxWl30TJDrGZlHaUihr89xj5gOWV+0bdav87vHAPnmdOU3 svig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=HWQTGr8bhs++B//bFQofbUNpl1HPAp+YLn0Y7pPKNIQ=; b=AEYQpDopIAJ36jvhgqBAXYS2h+3vfUohrIRJZP+4e4WbNNRLvZrz72hCbtiHK3S+V+ hzM7GZgNS/rcZUv8ZWGg4i9FjzA2DcOP199bcPNJWX9kMUiiEt4Cg7Gzz3+t3ixW6aIq lJIlYOl17UjmmgzYBNb8D11Htl1a9XFLbD9XsLZNdzCFFJfxwNwD3gawRvfyRzehmJQD kAjHFNOzKUzvy1CXwww6YM5h2L4GokFLYx9o4THupafQ6kDO1p2SwkskLmPAbtUie690 n0iIIJ/+K8AvGCtiCecAkpTMvaRhGOSzl4+5+vPLIppZW7BYsyvlpaGSHepXCJvmCuNf D8bw== X-Gm-Message-State: AMke39kCMJE/0d27MaGQC1GJaRg4CP8FCP2emU8pNzQ1DEDzHP8cK8YH6vrSx6bkWNfjPA== X-Received: by 10.223.170.200 with SMTP id i8mr19390356wrc.79.1489170458075; Fri, 10 Mar 2017 10:27:38 -0800 (PST) Received: from [10.60.124.86] (188.29.164.180.threembb.co.uk. [188.29.164.180]) by smtp.gmail.com with ESMTPSA id f67sm287011wmd.0.2017.03.10.10.27.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 10:27:36 -0800 (PST) Date: Fri, 10 Mar 2017 18:27:34 +0000 User-Agent: K-9 Mail for Android In-Reply-To: References: <24efb0e7-b0e3-68ed-5f42-2d5481f8f291@gmail.com> <44add374-6c4b-399a-c542-8d7f100dfaa3@fleshgrinder.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: Andrey Andreev CC: "internals@lists.php.net" Message-ID: <2AB030D8-9677-4E0E-8215-07D77910E51B@gmail.com> Subject: Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString() From: rowan.collins@gmail.com (Rowan Collins) On 10 March 2017 15:11:39 GMT+00:00, Andrey Andreev wr= ote: >Let's say I asked for one of 3 class constants, that happen to hold >integer values, and you gave me a string that just happens to be >castable to one of those values - you obviously aren't using my API >correctly, but I have no way of telling you this because the compiled >hid it from both of us=2E I actually nearly used that same example for the opposite point: you can't= *ever* know if someone used those constants, and it has nothing to do with= strict types=2E The only way typing would help you know that is if the language had native= enums, and was strict about casting to those=2E Regards, --=20 Rowan Collins [IMSoP]