Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34421 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41127 invoked by uid 1010); 4 Jan 2008 17:30:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41112 invoked from network); 4 Jan 2008 17:30:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 17:30:47 -0000 Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:38438] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/7D-63281-64D6E774 for ; Fri, 04 Jan 2008 12:30:47 -0500 Received: from [192.168.0.8] (xdsl-87-79-229-57.netcologne.de [::ffff:87.79.229.57]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Fri, 04 Jan 2008 18:30:43 +0100 id 0000000000020004.00000000477E6D43.00001E7C To: internals Mailing List In-Reply-To: <1199466701.15292.149.camel@sbarrow-desktop> References: <477DB7BF.10201@chiaraquartet.net> <20080104105558.GC7861@mint.phcomp.co.uk> <477E5649.2080104@chiaraquartet.net> <1199466070.15292.140.camel@sbarrow-desktop> <1199466701.15292.149.camel@sbarrow-desktop> Date: Fri, 04 Jan 2008 18:30:41 +0100 Message-ID: <1199467842.11288.27.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-7804-1199467843-0001-2" X-Mailer: Evolution 2.21.4 Subject: Re: [PHP-DEV] type hinting From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-7804-1199467843-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Sam, Am Freitag, den 04.01.2008, 12:11 -0500 schrieb Sam Barrow: [...] > Exactly. I just added the "mixed" type hint which is the same as using > no type hint. The new patch is attached. [...] To make your patch better you should add a bunch of test cases. Just a test brainstorming: * Current behaviour (no type hinting) works as expected * Current behaviour for class type hinting works * Scalar type hints are enforced to be lowercase ("Int" hints a class, "int" a primitive) * All new type hints work * All new type hint aliases work * All new type hints throw errors if wrong types are passed * Meta type hints (like "mixed", "num", etc.) work * Reflections on type hints work (foo(string $str); ReflectionParam::getType() =3D> "string", ReflectionParam::isArray() =3D> false and the like) There are already a few test cases for type hinting in tests/classes/type_hinting_*.phpt for you to look at. cu, Lars --=_milch.schokokeks.org-7804-1199467843-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iQIVAwUAR35tMCQPF+sCY6wHAQJf6g//T1y+3FacieINWv71dCBDTyXKtEqsP5j5 JF0BVAH0ZlAT+yLjJ7WYO78wF48/aWZz7Gm6HmbqVcGR5HJ1nHpahkkjBNCqflKZ JG+PGGkUGW8vTGcpI5yMfrUTxV2yDWAPBCIigSc80Ik6kgoyUAJIlYmmFvmnmyVA zxNXWAk7QTetqyhmBgaJraSGc3e6wBclqJ0RFxN6NvD24fnql+dLvmN60ODvnDSR lVPrTAzrxLpS6NXERTupEIi7FKc+Kqenkr/HQDbi1r2NyeQ6CSrivKuJj+GjJo1F j1TsLib16CzwIUce92Nhc1yJLUVzz84cJM+O68VaObuMUPmXT9SI/bsjvGibtBjd 7EsuDC4PdPg44ZF5wNdAeRKxrhrqeTlr1UUzQlbkSilayeGgRCsXAN0oshNbjON7 TGv6iKTYBwOV3zd+8OR1dPCpPn8w37Q8oWc9wmRfJeiS3Mn7qRnvyxK4lMAs5FFN SnX6CT8o5NXWuPlF3YICxUbJLQdeCtlxzdw/jguL1SJGhQf9Zr5socPnv1V5ytXx 1A+vaDueFGhoLUSdzedodNE19kq1mB4247uk3GlzjAHGl0BY8ih6ObIDRD7k8gtf 6BGdmJ6U2aEiHAU9LzPmTkYGWRygiRpMrbQpK1ZL3uzGL0NYTFFgBrFF+QtUDZ5M d2A5wziQbuQ= =dPc+ -----END PGP SIGNATURE----- --=_milch.schokokeks.org-7804-1199467843-0001-2--