Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105942 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6523 invoked from network); 16 Jun 2019 01:23:28 -0000 Received: from unknown (HELO mail-qt1-f182.google.com) (209.85.160.182) by pb1.pair.com with SMTP; 16 Jun 2019 01:23:28 -0000 Received: by mail-qt1-f182.google.com with SMTP id y57so6777741qtk.4 for ; Sat, 15 Jun 2019 15:37:13 -0700 (PDT) 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 :cc; bh=IK1LbQeBvPbbloJ9esZaoVbRbm6ABJr5lILoTOeLQFI=; b=TK953+l0awrAlPi/nRBgVN7jnm9rLDEoKO3t2ZG3uKepeWC35Rz2C4ouflHrLFxQ1+ 5tsTaZ25GNMKk3m8WcA8C3FGuEXdhfQmq25nhytXkOXTUK27y8pEPWWvvqabFNV+GC+5 E0VAuTuTJTE8eyLlgZSwV3GD8ZaNQlAUPh3mlqVaICoXfIbCYxWtCMjO2o4RwITHgULg cd3gQK7FZUFgi6GWRWzVhYcfiCWcC0Y4p3k+mjJ214DTfbNNNCigp08sDThDJLvFJOS6 YSCX+a1YAKaNCHbzGe01qIdvYs9pPabx01g1vgGaBQFGQdrRUaoKRFY7W6CfsEw3C10r aurg== 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:cc; bh=IK1LbQeBvPbbloJ9esZaoVbRbm6ABJr5lILoTOeLQFI=; b=lve4y9U1NSHF7LJPvkGMgBxRSv15WVUGcLh11fR8fxDka/WWejz2gB1LpuEoynkvoo cKG1CBI9M1EE3+yIwtA5AT8XKFLfh1HDq+3hGN4D1uGUvLFbfe31YOoy5xO/uecSxiO8 y4hmsRSZMkakQ+t/EEd5l7ob3qrXD7+bDCk+ceNDC1KqVzJvLP6ocko/AOcQMq5GeG2Q Ft7M/HrUVm+62U07vp/YBYyxrbqEuV7GDxGPIpT+jtLdzKs3Bz7Q0j3d4V5etYh8Egi0 08GxUEQJxoSho8M8KS3OWT24p/avSqFKuTOHqgoTl+jW5dKMg/m7H9xjSsoBdj+jEK6k gZjQ== X-Gm-Message-State: APjAAAW4uMTHKytEmFAYWG1LtdoQhwEY7PUmjIQnby/7j+2yA7plT+aD bpG6/O03iDhgIeIqgeFUx0pTyhXCK0c13ia24Xs= X-Google-Smtp-Source: APXvYqwC3MdeN0Kv1qQk+Mu5cG+Hfk11DTn8Js2yg41Ls4bX8ItwSQSbBocPGNq7Eq0SCwHgxNAgJF44no72xgMi3Bc= X-Received: by 2002:ac8:2a69:: with SMTP id l38mr21005355qtl.212.1560638232640; Sat, 15 Jun 2019 15:37:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 16 Jun 2019 00:37:01 +0200 Message-ID: To: Kalle Sommer Nielsen Cc: Marco Pivetta , PHP Internals List Content-Type: multipart/alternative; boundary="0000000000007ac089058b646739" Subject: Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures From: netmo.php@gmail.com (Wes) --0000000000007ac089058b646739 Content-Type: text/plain; charset="UTF-8" Hi Kalle, I realize it's going to be a bit odd when binding by value. But it's not that hard to grasp. ``` $a = 123; $closure = function(){ use $a; echo $a; // 123 }; $a = 345; ``` For this reason I specified it is mandatory to have `use` only at the very top (otherwise, it would _really_ be confusing :P) --0000000000007ac089058b646739--