Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58769 invoked from network); 1 Jul 2009 20:42:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2009 20:42:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.153 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 72.14.220.153 fg-out-1718.google.com Received: from [72.14.220.153] ([72.14.220.153:28455] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/43-43450-F1ACB4A4 for ; Wed, 01 Jul 2009 16:42:08 -0400 Received: by fg-out-1718.google.com with SMTP id e12so358711fga.0 for ; Wed, 01 Jul 2009 13:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=a7ZhCrwKvr8nBnAsppbKFp9s3MD3B437ZCRLTjI0rlU=; b=WqwnSZEg5tqh+TQaea7InVsRR4XyIr6NuBgLmh9ZvehX9PF4r1HkcSgQmIPsrk9BoQ o7h5OKpqd0Eh2j52tkNT7Y6I6Hsc1Lp8UU3E2tiT0SOXlxd35NwFrWXFyI2C+jvV7i0/ 3UED/ce+lmgq+iuy/bg4WhkJx6uRJrrl1emhk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=cWdBWAaum37Vo7gMR4mbKoU08KDR6VYBckSOhN0ZsNmxyhjZfjTgdbeFLCZXK+g+bX OG7u8rCjRDa7tMAW0rorAPvQp2p+3SBhb2t+aXJTn8vamS6pz/1ZiBTJoebac461Djmn fjmBz2WaBNzVWHSNI2nnS1d/UFYWW7psVL894= MIME-Version: 1.0 Received: by 10.86.74.4 with SMTP id w4mr4294775fga.65.1246480925192; Wed, 01 Jul 2009 13:42:05 -0700 (PDT) In-Reply-To: <4A4BC731.1020909@zend.com> References: <4A4BA5C8.1020204@zend.com> <4A4BAE7B.3020601@zend.com> <39D0B97E-3A70-44E3-B1BC-D68A0E58CA76@prohost.org> <4A4BC731.1020909@zend.com> Date: Wed, 1 Jul 2009 22:42:05 +0200 Message-ID: <7f3ed2c30907011342y24ccd2c7te5f7c273f001fa7a@mail.gmail.com> To: Stanislav Malyshev Cc: Ilia Alshanetsky , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: hannes.magnusson@gmail.com (Hannes Magnusson) On Wed, Jul 1, 2009 at 22:29, Stanislav Malyshev wrote: > Hi! > >> C does not have booleans, they are emulated via smallint/tinyint. As far >> as your other message goes, this patch does nothing to affect how native >> functions handle args. > > Right. So we would have two APIs for types - one coercing (for internals) > and one strict (for user functions), which would work in entirely different > way. Is that good? How is that different from what we have already? Internally you type hint (arginfo) what you want, in userland you'll be able to do that too (int $foo). Internally you parse arguments (param parsing, casting), in userland you do that already (function fo($var) {$var = (string)$var}) I don't understand what "work entirely different" you are talking about. This is how PHP already works. -Hannes