TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
539 B
20 lines
539 B
--TEST--
|
|
Named Arguments - PHP 8+ function call syntax
|
|
--FILE--
|
|
<?php
|
|
// Test mixed positional and named
|
|
function format_string($prefix, $content, $suffix = '') {
|
|
return $prefix . $content . $suffix;
|
|
}
|
|
|
|
function main() {
|
|
// Test mixed positional and named (positional must come first)
|
|
var_dump(format_string('[', 'content', ']'));
|
|
var_dump(format_string('[', 'content', suffix: ')'));
|
|
var_dump(format_string('<<', 'data', suffix: '>>'));
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(9) "[content]"
|
|
string(9) "[content)"
|
|
string(8) "<<data>>"
|
|
|