Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112218 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70966 invoked from network); 10 Nov 2020 18:16:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Nov 2020 18:16:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1684A1804B5 for ; Tue, 10 Nov 2020 09:38:56 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 10 Nov 2020 09:38:55 -0800 (PST) Received: by mail-pf1-f177.google.com with SMTP id c66so6354481pfa.4 for ; Tue, 10 Nov 2020 09:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=gKg5MRkFIVSTo+AQEAJSxERWL8WSPe34P3B4gmElrg8=; b=M5P2ToxyzupmAKcY+TDORUCDK9GYMbaXfKNOIk2BVnvMAPxdPc8BCvlrSdFo69rk17 oNjgRLNigI7CzYMajBgD0u2xW5HoJgaVDsorg2J58o0h3xtzYRr26vqjZjrT7m1zFe2V qo65yPCifofvRrW2X5IOCxstumdcScD5RD3Rz8ScUm50QcEyKKkePUQJkK3gr9tT5g/U APs1VQ41Ez2VReY5skeM4U9IqIKJUvYx0WZ38NIx9xaiqLmBTme0mf92qYcICs48vtmR NP5ZD1lgcXp8KvFpgZvo2rHpIt5i/OnboCglvtWfrzpfKIBO69Wy/C4XMUd5nTtf6NHU u/cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=gKg5MRkFIVSTo+AQEAJSxERWL8WSPe34P3B4gmElrg8=; b=d/noJgWDZicnXdm+nbfRqnNKE2m5yYk+++7ETgaJRm9Vamt4CDNIltp60pF4WdkgGm k6rw9FTmRFRc/V4tG0AfEMOfVG4fjYj3ipf/p5BAJEuuSTUUYuLdLov4oQ4o9JrOhLcN A34Vqm2jlju5KAwi++iImMMt58tnXNQmJnTiNovEIG8rP8olZ/IwqWvs3e67aKRM//Ow B442tKCHYMFQN2fFbXsc2sdvdo0mntdWT5F0BHMpo2QAjLSqgViBOxru0TgMaOo2StYe 92hS/C7kuE+ZP5SS9VUXfdHQ+WXK9foTKOlpXzh2swiA3hSjMw+EO2xJJCER6EdBkqs1 jVBA== X-Gm-Message-State: AOAM532HvcBeu/QmftiDQtKWUb3Nxmr1zg4Gyfg1vbRM0PEbyda34syN VXIqXlnpxVUTEQSdgUmaUEQNpt8TXKqlFzs5PU/DrE4992hOBg== X-Google-Smtp-Source: ABdhPJzeVmtL8oGO/xOf+sApNrJCcmcb9NcTdsI03+LziEmkAb7xuukoMhZRWwBch5h6wnb6Go9s+AHFpI6IJvW9fPo= X-Received: by 2002:a17:90a:d3d3:: with SMTP id d19mr232178pjw.0.1605029930569; Tue, 10 Nov 2020 09:38:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 10 Nov 2020 18:38:38 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Draft - Closure self reference From: divinity76@gmail.com (Hans Henrik Bergan) something i'm missing from Javascript is the ability to give names to closures, this both gives closures the ability to reference themselves, but it also makes for meaningful stack traces, eg this is legal javascript: (function TheClosuresLocalName(){console.log(TheClosuresLocalName); throw new Error("look at my stacktrace!");})(); - the name is optional, and only visible inside the closure itself, and unfortunately this is not legal in PHP, i wish it was.