Skip to content
Advertisement

Tag: python

Why is PHP7 so much faster than Python3 in executing this simple loop?

As an extremely simple benchmark, I executed the below simple code on PHP 7.0.19-1 and Python 3.5.3 (command line) on the same Raspberry Pi 3 model B. Python’s execution time was horrible in comparison to PHP’s (74 seconds vs 1.4 seconds). Can anyone help me understand why the execution takes so much longer on Python? Is there something I’m doing

Executing Python Script with PHP Variables

I am writing a simple application that uses information from a form, passes it through $_POST to a PHP script that executes a python script and outputs the results. The problem I am having is that my python script is not actually running with the arguments being passed in. process3.php file: Output: At the top of my wordgame2.py, I have

Python SimpleHTTPServer with PHP

I used python -m SimpleHTTPServer, but the PHP files don’t execute instead they just been downloaded. I heard about WPHP in an old post. But I don’t know how to use it. How I can work with it ? Answer The reason why the Python Webserver sends your PHP files to the brower is likely because it is not configured

Advertisement