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.
 
 

31 lines
524 B

--TEST--
Keyword ExtensionProvider method with snake_case name
--FILE--
<?php
declare(strict_types=1);
use native_types;
#[ExtensionProvider(complex_types::type_any)]
final class KeywordExtensions
{
public static function var_dump(mixed $var): void
{
var_dump($var);
}
}
function main(): void {
$str = "hello world";
$str->var_dump();
$int_val = 42;
$int_val->var_dump();
$float_val = 3.14;
$float_val->var_dump();
}
?>
--EXPECT--
string(11) "hello world"
int(42)
float(3.14)