Giter Club home page Giter Club logo

static-php-swoole's Introduction

static-php-swoole

Compile A Statically Linked PHP With Swoole and other Extensions 编译纯静态的 PHP Binary 二进制文件,带有各种扩展(CLI 模式,暂不支持 CGI 和 FPM 模式)

环境需求

  • 目前在 x86_64 平台试验成功,其他架构需自行测试
  • 需要 Alpine Linux(测试环境为 3.13 版本,其他版本未测试)系统(也就是说需要 musl)
  • WSL2 也是支持的

开始

可以直接带走此仓库中的编译好的二进制(./php),版本 7.4.16(swoole 版本 4.6.6)。

# 自己编译
./static-compile-php.sh

完事后在 php-dist/bin/php 这个二进制文件可以随意拿着去任何一个 Linux 系统运行了!

包含扩展

  • calendar
  • ctype
  • filter
  • openssl
  • pcntl
  • iconv
  • json
  • mbstring
  • phar
  • pdo
  • gd
  • pdo_mysql
  • mysqlnd
  • sockets
  • swoole
  • redis
  • simplexml
  • dom
  • xml
  • xmlwriter
  • xmlreader
  • posix
  • tokenizer

运行示例

编译后的状态 image

在不同系统直接运行 Swoft image

static-php-swoole's People

Contributors

crazywhalecc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.