Include Python code snippet in PHP script

Is it possible to include a piece of code written in Python to a PHP script?

Answer 1, authority 100%


system – Execute an external program and display the output

For example:

$last = system('python args', $retval);

Answer 2

If you have such a strange question – change the approach to solving the problem.
Write immediately in either PHP or Python.