是否有一个 PHP 沙箱,就像 JSFiddle 之于 JS?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4616159/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a PHP Sandbox, something like JSFiddle is to JS?
提问by Jiew Meng
Is there a PHP Sandbox, something like JSFiddle is to JS?
是否有一个 PHP 沙箱,就像 JSFiddle 之于 JS?
采纳答案by Gordon
If you are just looking for an online site to play around with PHP code, try
如果您只是在寻找一个在线站点来玩弄 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/(permits attaching a version of the Laravel framework)
- 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 框架的一个版本)
The most sophisticated is:
最复杂的是:
It lets you test your code in all PHP versions starting from PHP4.
它让您可以在从 PHP4 开始的所有 PHP 版本中测试您的代码。
If you want something for your local environment, the Runkit extensionaims to provide a PHP Sandbox:
如果你想要一些适合你本地环境的东西,Runkit 扩展旨在提供一个 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_Sandbox 类会创建一个具有自己的作用域和程序堆栈的新线程。使用传递给构造函数的一组选项,这个环境可能被限制为主解释器可以做的事情的一个子集,并为执行用户提供的代码提供一个更安全的环境。
If you dont want to use Runkit but still want a PHP Console on your server, try
如果您不想使用 Runkit 但仍希望在您的服务器上有一个 PHP 控制台,请尝试