Home >Backend Development >PHP Tutorial >How to build an online code compiler yourself?
I want to build an online compiler similar to codepad
that can compile php ruby python and other code blocks online
The starting idea is to install a PHP environment in centos and execute php shell_exec("docker run -v "$(pwd)":/usr/src/app -w /usr/src/app docker.io/php php index. php ");
It can be executed normally, but it takes more than 5 seconds, which is not cost-effective. It seems that other online compilers are very fast. How do they achieve it? Is there any master who can share the specific code or ideas
I want to build an online compiler similar to codepad
that can compile php ruby python and other code blocks online
The starting idea is to install a PHP environment in centos and execute php shell_exec("docker run -v "$(pwd)":/usr/src/app -w /usr/src/app docker.io/php php index. php ");
It can be executed normally, but it takes more than 5 seconds, which is not cost-effective. It seems that other online compilers are very fast. How do they achieve it? Is there any master who can share the specific code or ideas