Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95641 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31153 invoked from network); 5 Sep 2016 12:35:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2016 12:35:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:36415] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/BD-45301-9766DC75 for ; Mon, 05 Sep 2016 08:35:08 -0400 Received: by mail-wm0-f52.google.com with SMTP id b187so17712670wme.1 for ; Mon, 05 Sep 2016 05:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fmqiW5vM3G0xhLk4POVHguF+/IKkHAIPqU46GhJ5PUY=; b=PQdtNJ6lvR5BKTrlAfaUzMCWDKDbRwAerC9gClP528KiBuMT6M1vloRS0guWngoEb6 +Qi/YbF5oPkeIBlHTHGH4jAbM+AbkQ+XrIYQQiteLfFyMw4a6/OnD8jOvUjatBMJ0bNp 1t/v1yHa4sL/qbIgy9GG7DlNOdFrsiGuDtLdyEW7l3hGdwWZYxxRRi5LAkfgdfPGA290 KwKD7ugmeSY5IjaK+/MknWA0Eoa3c4YCA+GjN34SJCNFl6Wl9CuMR1v03xRjfVKyIsT9 kNRuFCQdbqgZUSl7lMR1WGF7iidxYK2mYBzhplZ2Eu6Z07siH4KxsH05XcwLWvsi70hO 0niQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fmqiW5vM3G0xhLk4POVHguF+/IKkHAIPqU46GhJ5PUY=; b=TK5mrGlnDe4cvzfjC5dmRxPwnlJtgmNsHObSXGEW8IlCxzKD6HbxoU5bK4kf89JlVD qvXXuE1AUk9mA7IVBgCOMYA1XkPLiVrO+mJhcO1qHqNr3UDqVglFfbTjQtTO56OflJFR SuioklzYfhbAonSaXeRMaqXubMH0sgajt94J9o0KThjqRkdotwbjALqKne0YOaKrVDmd a+vR4r/jyNEzy6+tw10oe1y5SKMbpRa7PlQm8NGS2rWTG2PD7Pm+1zmpyQoiYEEBF04i mLcHInH/o1gJlVSdl3obY4uhqmvyoYomiju0mhKAlCK8spuReZW5B93OtNmNO7ySkkkU 7U9A== X-Gm-Message-State: AE9vXwNKhMZFKgPKSQuqb76sK/y1PEa0wUggkg9h9c/Znk/oBrxCQCoYjDbF3B0XxSH71Y8so+w4TfulmMKdrQ== X-Received: by 10.28.39.133 with SMTP id n127mr15649595wmn.6.1473078902969; Mon, 05 Sep 2016 05:35:02 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.45.4 with HTTP; Mon, 5 Sep 2016 05:34:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Sep 2016 14:34:22 +0200 X-Google-Sender-Auth: _RMq8D2B6f0W6Eo02qrSy-25FCI Message-ID: To: Nicolas Grekas Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Missing reflection info about strict types? From: jpauli@php.net (Julien Pauli) On Mon, Sep 5, 2016 at 11:38 AM, Nicolas Grekas wrote: > Hello, > > It looks like we miss a way to check by reflection if a function/method has > strict types enabled or not. > > We'd need to do this in Symfony to generate a file with concatenated > classes, but split "declare_strict=1" classes out so that they don't break > (because there is no way to create a single file that contains both strict > and non-strict classes unfortunately also). > > Would it be possible to expose some flavor of ZEND_ACC_STRICT_TYPES to > userland? I guess what you miss for what you want to do, is to detect if strict types are activated into the current scope, at runtime. Here is a feature that solves that. https://github.com/jpauli/php-src/tree/is_strict_types Julien.P