I was making an online judge and ran into bit of a problem
What I've done till now?
So my php code takes user code and gives it to a function Compile() which compiles the code and reports back whether the compilation has been successful or not. This part of the code works pretty well.
Now the things left are running the code and evaluation
My problem
My problem is how to handle stdin inputs for user. User generally takes input from stdin using scanf, BufferedReader etc and these values are generally taken using keyboard. Now supposing that i have written those values in a file. How will i feed them these value.
My Attempts
Well I was searching for various ways and i came across this
fopen('php://stdin', 'w')
If i believe that this works like a file than wouldn't it cause problem if multiple users use stdin at the sametime.