Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86184 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74263 invoked from network); 12 May 2015 21:45:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2015 21:45:39 -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.212.179 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:36052] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/F5-41925-28472555 for ; Tue, 12 May 2015 17:45:39 -0400 Received: by wizk4 with SMTP id k4so172652252wiz.1 for ; Tue, 12 May 2015 14:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=c9m774eYNePgf2Fi/eFA6DSoZP65oY5C2ABKEJTHdn4=; b=kuwNjsFe/gKwNUvFomTYqg8RIrEATq+7fynvIzYfDp55OGsjcqztD59dMTOX6pcRTL ZKzYL6aZ+gKnHfBDWVlKRl/iI/HOddxEZB4gp8DJyIjBWW0fXc4KGz7hKkgOngm7zwZD wGi4hHMxbHBMcHtzih/VVUNISIiPuBiALs7ckQuXS+2SqU/0EiFjoV7XF2DZeBIgqLYs YHUvCMmdhQ9D1X+mxfIGfXZnzQ9tdydnU3fTVDMJNYWfGAaibLi17hF69TTTnX+GyANH /6nImVKmGgUrRrm9k0bdWUP7l+4SEH290uP7tRZ9/0gezcLSD7VTM2AZQ3dCncoAJFVW MSgA== X-Received: by 10.180.100.227 with SMTP id fb3mr8574050wib.90.1431467135969; Tue, 12 May 2015 14:45:35 -0700 (PDT) Received: from [192.168.0.6] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id cf9sm4052434wjc.27.2015.05.12.14.45.35 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 May 2015 14:45:35 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: <5552540C.9000205@lsces.co.uk> <1C9DBFFC-7B6D-470B-B706-7A6B0938C67A@gmail.com> <55526363.1090105@lsces.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 12 May 2015 22:38:46 +0100 To: PHP internals Message-ID: Subject: Re: [PHP-DEV] is_digits() and digits type From: rowan.collins@gmail.com (Rowan Collins) On 12 May 2015 22:32:55 BST, Rowan Collins wrote: >It is already possible to pass around, and type hint for, any class of >object, so you could for instance have a DatabaseID class. PHP's lack >of operator overloading makes that less appealing, perhaps, but it >would work. Incidentally, it's still not the type hint that's performing validation here - that would go in the constructor of the object, I guess. Rather, the type hint holds the promise that the validation has already happened somewhere else.