forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce <<NameAlias($alias)>> to allow second name for named param.
- Loading branch information
Showing
5 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--TEST-- | ||
NameAlias Attribute | ||
--FILE-- | ||
<?php | ||
|
||
function test(<<NameAlias("bar")>> $foo) { | ||
echo $foo; | ||
} | ||
|
||
test(bar: "Hello World"); | ||
--EXPECT-- | ||
Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
/* This is a generated file, edit the .stub.php file instead. | ||
* Stub hash: 54eede8541597ec2ac5c04e31d14e2db7e8c5556 */ | ||
* Stub hash: 59e49a64d9ef3814513d84094652742261f94468 */ | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Attribute___construct, 0, 0, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "Attribute::TARGET_ALL") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NameAlias___construct, 0, 0, 1) | ||
ZEND_ARG_TYPE_INFO(0, alias, IS_STRING, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
|
||
ZEND_METHOD(Attribute, __construct); | ||
ZEND_METHOD(NameAlias, __construct); | ||
|
||
|
||
static const zend_function_entry class_Attribute_methods[] = { | ||
ZEND_ME(Attribute, __construct, arginfo_class_Attribute___construct, ZEND_ACC_PUBLIC) | ||
ZEND_FE_END | ||
}; | ||
|
||
|
||
static const zend_function_entry class_NameAlias_methods[] = { | ||
ZEND_ME(NameAlias, __construct, arginfo_class_NameAlias___construct, ZEND_ACC_PUBLIC) | ||
ZEND_FE_END | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters