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.
15 lines
318 B
15 lines
318 B
<?php
|
|
|
|
function main(): void
|
|
{
|
|
$list = python\list([1, 2, 3]);
|
|
$array = $list->toArray();
|
|
$value = convertPythonValue($list);
|
|
$integer = python\int(42)->toValue()->toInt();
|
|
var_dump($array, $value, $integer);
|
|
}
|
|
|
|
function convertPythonValue(PyObject $value): mixed
|
|
{
|
|
return $value->toValue();
|
|
}
|
|
|