Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88984 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40736 invoked from network); 29 Oct 2015 02:57:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2015 02:57:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.178 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.214.178 mail-ob0-f178.google.com Received: from [209.85.214.178] ([209.85.214.178:35135] helo=mail-ob0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/05-08716-91B81365 for ; Wed, 28 Oct 2015 21:57:29 -0500 Received: by obctp1 with SMTP id tp1so23242927obc.2 for ; Wed, 28 Oct 2015 19:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=GWCdG/3fV1zK3JEJXEdfIHpV4zBt/bFNsAsQXyS0plQ=; b=a6e5jECTCcqZKG0rnWVc/m+RdJ8KrzpLzRm67COjBYdOaQHUMgISXqtyf4VD7OMwnz nuj+O774aINaOyGUMvvxvy7NVyMemWCrWyb9ckpviSHgwGLDXQsRDpA3BMYP19Jeal9M cfPTrn4lqRmhF4SdmTlROwnGp3FHXjm20mD3DOWe5u70Yyjic4JcYcmgA+wxgZRr1VBk vxOlMQYM0QlRyW9lfzvyUt3FivTm2+Uyu1XQPOaPn2erhX3okiRiuVcteIdQfgs+dati 5owWzt8xcA67Uy4ctFLlUcrb5h5aGlysJ33M/xXSHNulWYZ5cGfr+h8VHHvJaZix73Tx aeUA== X-Received: by 10.182.116.200 with SMTP id jy8mr36515351obb.35.1446087446473; Wed, 28 Oct 2015 19:57:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.206.3 with HTTP; Wed, 28 Oct 2015 19:57:07 -0700 (PDT) Date: Wed, 28 Oct 2015 22:57:07 -0400 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=089e015374ec8fb64d052335785f Subject: Support execution scope realization at runtime (or last pieces for private class support) From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --089e015374ec8fb64d052335785f Content-Type: text/plain; charset=UTF-8 Hi internals! I want to revive an old patch I was working on last year, and open for discussion the last missing piece to make it fully complete, allowing me to write a RFC. Link to patch introducing support to private classes: https://github.com/php/php-src/pull/947 Currently, there's no way to determine at runtime what is the scope of the execution. This means you can't resolve if the current instruction is happening on a top-level scope, in a class definition, namespace, function or method. Together with this (maybe even more importantly), there's no way to resolve namespaces in any way, since they only exist up to compile time (they become part of class name through string append), and no real data structure around it exists. I was forced to create a weird string check to make it work... =( I wonder what would be necessary to make this patch possible, if there's any interest to move this forward and potentially target it for 7.1 release. Regards, -- Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --089e015374ec8fb64d052335785f--