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.
|
<?php
|
|
|
|
class PyObject
|
|
{
|
|
public function toValue(): int
|
|
{
|
|
return 42;
|
|
}
|
|
}
|
|
|
|
class PyList extends PyObject
|
|
{
|
|
public function toArray(): array
|
|
{
|
|
return [1, 2];
|
|
}
|
|
}
|
|
|
|
function main(): void
|
|
{
|
|
$value = new PyObject();
|
|
$list = new PyList();
|
|
var_dump($value->toValue(), $list->toArray());
|
|
}
|
|
|