I'm looking at building a site designed to allow users to test PHP code and was wondering if there's a safe way to implement such functionality.
Of particular concern, is there a practical way to allow them to only edit the contents of a single folder without having a separate user on the server for every user of the site?
Another thing which comes to mind is the system() function, though it seems this should be trivially easy to disable by creating a single user on the server with virtually no commands available to it.
Is there anything else I should be concerned with? It seems as though there should be myriad problems, but I can't really think of many.
Also, I realise this may belong on serverfault, but I thought that people here would have a more nuanced understanding of PHP.