有没有一个 PHP 沙箱,像 JSFiddle 之类的东西是 JS 的?
最佳答案
如果您只是在寻找一个使用 PHP 代码的在线网站,请尝试
- http://phpfiddle.org/
- http://ideone.com/
- https://codeanywhere.net/
- http://www.tehplayground.com/
- http://sandbox.onlinephpfunctions.com/
- http://codepad.org/
- https://eval.in/
- https://implode.io/ (允许附加 Laravel 框架的一个版本)
最复杂的是:
它可以让您在从 PHP4 开始的所有 PHP 版本中测试您的代码。
如果您想要一些适合您本地环境的东西,Runkit extension旨在提供一个PHP沙箱:
Instantiating the Runkit_Sandbox class creates a new thread with its own scope and program stack. Using a set of options passed to the constructor, this environment may be restricted to a subset of what the primary interpreter can do and provide a safer environment for executing user supplied code.
如果您不想使用 Runkit 但仍想在您的服务器上安装 PHP 控制台,请尝试
关于php - 是否有一个 PHP 沙箱,比如 JSFiddle 之类的 JS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4616159/