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.
 
 

23 lines
378 B

--TEST--
Python module scalar results remain wrapped objects
--SKIPIF--
<?php
if (!extension_loaded('phpy')) {
die('skip phpy extension is not loaded');
}
?>
--FILE--
<?php
use python\math;
function main(): void
{
$result = math::sqrt(4);
var_dump(get_class($result));
var_dump(python\scalar($result)->toFloat());
}
?>
--EXPECT--
string(8) "PyObject"
float(2)