plugowski/php_sandbox 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

plugowski/php_sandbox

Composer 安装命令:

composer require plugowski/php_sandbox

包简介

Simple sandbox to quick evaluation php code.

README 文档

README

Simple and usefull tool to execute custom php scripts. It allows to block specified function to increase security.

Screenshot

PHP Sandbox

Installation

Clone that repository wherever you want (in my example /www/php_sandbox)

$ git clone git@github.com:plugowski/php_sandbox.git
$ cd php_sandbox

and load all dependencies via composer:

$ composer install

The final step is to run docker using docker-compose commands (of course the first step is to install docker for your environment.

$ docker-compose build
$ docker-compose up -d

Now you have working docker, go to your favourite browser and hit that addres:

localhost:8080

Voila!

Usage

Just type some code and push Evaluate button or use keyboard shortcut on Mac Command+Enter or Ctrl+Enter on Windows. More shortcuts you can find here.

Changed shortcuts by me:

Windows Mac Action
Ctrl-Enter Commantd-Enter Execute code
Ctrl-S Command-S Execute code
Alt-Shift-Up Option-Shift-Up Move lines up
Alt-Shift-Down Option-Shift-Down Move lines down
Ctrl-D Command-D Copy line
Ctrl-Shift-L Command-Shift-L Show sidebar
Ctrl-Shift-S Command-Shift-S Save Snippet
Ctrl-Shift-P Command-Shift-P Add Library / Package

Changelog

  • 1.4
    • docker! Now you can use Sandbox with containers and don't be afraid about lost data from computer while use dangerous functions
    • multi php now uses fastcgi to evaluate php scripts, no shel_exec anymore :)
    • small refactoring
    • new Kint for debugging
  • 1.3
    • added library manager, now you are able to add external libraries from packagist, and use it in sandbox directly
  • 1.2
    • fixed counting of memory used by script (now it is counting only for evaluated script without extra stuff from bootstrap)
    • added new PhpStorm shortcut
    • changed routing from FatFree to my own (FatFree fired couple ini_sets which might conflict with security settings, where ini_set() function will be disabled)
    • added snippets, which you can save and load in any time
    • added possibility to switch between couple of php versions
  • 1.1
    • added Kint debug tool for dumping varialbles
    • refactored Config class
  • 1.0
    • Initial release
    • visual editor based on ace
    • simple benchmarking (count memory usage, memory peak and execution time)
    • "last load" option

Licence

That code is licenced under New BSD License.

Credits

To build that tool I used:

plugowski/php_sandbox 适用场景与选型建议

plugowski/php_sandbox 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 5, 最近一次更新时间为 2016 年 11 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 plugowski/php_sandbox 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 plugowski/php_sandbox 我们能提供哪些服务?
定制开发 / 二次开发

基于 plugowski/php_sandbox 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-11-22