php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62552 Feature Request: Closure parameter syntax enhancement
Submitted: 2012-07-13 13:22 UTC Modified: 2012-07-16 03:10 UTC
From: k at webnfo dot com Assigned:
Status: Duplicate Package: *General Issues
PHP Version: 5.4.4 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: k at webnfo dot com
New email:
PHP Version: OS:

 

 [2012-07-13 13:22 UTC] k at webnfo dot com
Description:
------------
Add 'AS' keyword after 'USE'

It will work like this:

function($quantity, $product) use ($tax AS $t , &$total as $a){
  echo $t; //$t is the local name alias of $tax
}

If implemented, will be more consistent with namespace's use .. as .. statement


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-16 03:10 UTC] laruence@php.net
-Status: Open +Status: Duplicate
 [2012-07-16 03:10 UTC] laruence@php.net
this is a dup to #61682
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC