Unfortunately the extensions is very alpha and even if it's old it, the development hasn't been that fast. Actually is a bit stalled.
However here is a code sample:
Code: Select all
<?php
$a = "test";
$b = true;
$c = 50;
$d = 60.4;
$code = <<<EOD
import php
a = php.var('a')
b = php.var('b')
c = php.var('c')
d = php.var('d')
print a, b, c, d
print a, d / c + b, a
EOD;
py_eval($code);
?>Code: Select all
test 1 50 60.4
test 2.208 test