Is there a PHP Sandbox, something like JSFiddle is to JS? [closed]

前提是你 提交于 2019-11-26 19:11:01

If you are just looking for an online site to play around with PHP code, try

The most sophisticated is:

It lets you test your code in all PHP versions starting from PHP4.

If you want something for your local environment, the Runkit extension aims to provide a PHP Sandbox:

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.

If you dont want to use Runkit but still want a PHP Console on your server, try

http://codepad.viper-7.com/

The system allows full access to all PHP functions - no restrictions and no safe mode. Many common extensions are loaded and available for use. Security is provided on an OS level by strict user permissions inside a setuid chroot jail protected by system call tracing, which should all be transparent to PHP code. You can write files in the /temp folder, but they will be periodically deleted.

The Profile code option will use XDebug to trace every function call in your code and measure the time taken, and will also use VLD to generate a full opcode listing to see how PHP executes your code 'under the hood'!

I personally prefer eXorithm's. Similar to JSFiddle and has custom output formats.

http://www.exorithm.com/algorithm/sandbox

http://c9.io - Not a sandbox but and online IDE that I quite like so far. Supports a LOT more than PHP.

Found this from a Google search,

http://writecodeonline.com/php/

Add this one to the list: http://sandbox.onlinephpfunctions.com You can choose the php version and save and share your data.

Dchris

You can try:

http://www.ideone.com

If you are looking for something simple and fast.

I tried many tools facilitating PHP execution online.

Finally found the Compile Online the best!

This one solved my problem! :-)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!