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.
 
 

21 lines
508 B

<?php
function pythonBuiltins(): void
{
$list = python\list([1, 2, 3]);
$dict = Python\dict(['answer' => 42]);
$tuple = PYTHON\tuple([1, 2]);
$set = python\set([1, 2]);
$str = python\str(123);
$int = python\int('42');
$object = python\object('value');
$bytes = python\bytes('value');
$value = python\len($list);
$scalar = python\scalar($int)->toInt();
python\print($dict, $tuple, $set, $str, $int, $object, $bytes, $value, $scalar);
}
function main(): void
{
}