Ok, I have to ask this.
When I use shell_exec, exec or other commands to execute python code from php, my page loads 10x slower. So even in my localhost, empty pages with exec or system functions load in around 0.01 seconds while under normal circumstances this time is around 0.001 seconds. I feel more comfortable with python while trying to achieve my task (a html parser that extracts info according to my needs, find most recursive words, index them etc etc...) [1]. However, the slowness of these functions make me think again to rewrite the same class in php. Isn't there any other efficient way to execute python from php?
*[1] I prefer writing my own classes rather than 3rd party parser since they do not satisfy my needs at all.