Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83882 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71610 invoked from network); 26 Feb 2015 10:10:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2015 10:10:29 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.172 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.172 mail-vc0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:57248] helo=mail-vc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/31-65287-411FEE45 for ; Thu, 26 Feb 2015 05:10:29 -0500 Received: by mail-vc0-f172.google.com with SMTP id kv7so3523175vcb.3 for ; Thu, 26 Feb 2015 02:10:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=i5XJhNurr0M3deIaWneB8N1+7Bvh7BYnPJu2RJEfyBw=; b=frqfj0VhxxnHIOxZCK7OlpQ6omDuq2mKAKbm5t9mL3Pan/fnsgZYv1o9jPY3biZXZ7 wTYexS0tOHXaZjXkAQCZ7VXQRQlDz4s+0Kgy/CUSx7pQ1F7BCoc2toM3SmeMirA2K/Ma twmkd0h9fv6FJCDvhJDvBlJFVEc0iIh6DDRRFAQQJK8pD8OEQRBazBnbKdaIrSX2rcBH CqlaZDGFrP6IEHYgtKsce7igbwnsMYht9rILfU15BB67z1K30l2rD8WeJSWdnaOz5USI oxQgAeXsusyxtbB0/pvcNbcmw3OFWS6SMysuQICMtvK8S78SzkagcJgNRCBkNby3svn2 6nTA== X-Gm-Message-State: ALoCoQn3Ef6wYh70gF5Yw3Mf0VoN8sQynOz1Pp3GNTmnsZ/rxbyVHLiBkd6Lei+fNxfZwLwSKIzPje89SR19erl3IFWKaX6X6mQ9UW/+QfakpMt8AxpcjLaIyrAORyQS0C21Bhwd9rg5u9O+GtZy6Br8DPepRlwrHQ== MIME-Version: 1.0 X-Received: by 10.52.25.11 with SMTP id y11mr7934940vdf.51.1424945425421; Thu, 26 Feb 2015 02:10:25 -0800 (PST) Received: by 10.52.113.231 with HTTP; Thu, 26 Feb 2015 02:10:25 -0800 (PST) Date: Thu, 26 Feb 2015 14:10:25 +0400 Message-ID: To: Anthony Ferrara , PHP Internals Content-Type: multipart/alternative; boundary=001a1133e5f2e85bb8050ffaf5f9 Subject: Strict typing and callback vs declare() From: dmitry@zend.com (Dmitry Stogov) --001a1133e5f2e85bb8050ffaf5f9 Content-Type: text/plain; charset=UTF-8 Hi Anthony, What do you think about using a user level callback for strict type checks instead of declare(). It won't allow changing behavior per file, but this has its own cons and pros. If callback is not set, arguments are converted according to standard rules, if set and returns false - fatal error or exception is thrown. The implementation should be simpler and more efficient than using declare(). Thanks. Dmitry. --001a1133e5f2e85bb8050ffaf5f9--