1

PHP 编译器 BPC 5.0 发布了

 1 year ago
source link: https://www.v2ex.com/t/883959
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  PHP

PHP 编译器 BPC 5.0 发布了

  heguangyu5 · 11 小时 55 分钟前 · 1634 次点击

之所以要发个新版本,是因为开发 BPC 的初始目标要达成了!

我们是一家做 SASS 招聘管理系统的公司,主产品名叫 OurATS.

这个领域产品不多,一个手掌就能数过来.

大家在应聘面试过程中,说不定就曾收到过来自 OurATS 的面试邀请信.

这几年来,由于大家数据安全意识的提高,加上 2B 项目的特殊性,本地部署的需求越来越多.

OurATS 是用 PHP 开发的,PHP 项目本地部署说白了就是交付源码,这是我们不想要的.

经过一番调研,我们决定开发自己的 PHP 编译器.

将 PHP 转译成 C,然后编译成二进制,这能完美解决 PHP 源码保护的问题.

于是 BPC 就诞生了.

在开发 BPC 的过程中,我们发现,可以通过编译器解决软件授权问题.

这下本地部署的两个关键,源码保护和软件授权全都解决了!

经过两年的开发,到这几天,我们终于成功编译了 OurATS 及其附属支撑项目的代码.

由于 OurATS 是有完善的 PHPUnit 测试用例保障的,所以成功编译 OurATS 也是对 BPC 的一次强有力的检验.

BPC 5.0 还有一个亮点就是引进了 ninja 构建工具,从而可以并行编译.

当你的项目有成千上万个 PHP 文件时,并行编译能大大缩短编译时间.

截止到 BPC 5.0, 我们已经实现了以下 PHP 扩展(个别扩展只实现了部分函数和类):

  • standard
  • posix
  • mbstring
  • fileinfo
  • session
  • filter
  • pdo_mysql
  • pdo_sqlite
  • openssl
  • ctype
  • pcntl
  • simplexml
  • iconv
  • imagick
  • sysvsem
  • tinycdb

see bpc-php-7.2.19-tests

再列 3 个 BPC 编译的成功案例:

欢迎大家下载试用:

https://github.com/bob-php-compiler/bpc-release/releases/tag/v5.0

使用指南在这里:

https://github.com/bob-php-compiler/bpc-release/wiki/01_Install


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK