Download the PHP package crazywhalecc/static-php-cli without Composer

On this page you can find all versions of the php package crazywhalecc/static-php-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package static-php-cli

StaticPHP

Releases CI License Discord

StaticPHP is a powerful tool designed for building portable executables including PHP, extensions, and more.

[!IMPORTANT] We are preparing to release v3, which will include a project rename from static-php-cli to StaticPHP. And this branch is for v3. For v2, please check the v2 branch. Please update your references and stay tuned for the official release.

Features

Single-file standalone php-cli:

out1

Combine PHP code with PHP interpreter using phpmicro:

out2

Quickstart

1. Download spc binary

For macOS and Linux, add execute permission first:

2. Build Static PHP

First, create a craft.yml file and specify which extensions you want to include from extension list or command generator:

Run command:

3. Static PHP usage

Now you can copy binaries built by StaticPHP to another machine and run with no dependencies:

Documentation

The current README contains basic usage. For the complete feature set of StaticPHP, see https://static-php.dev.

Direct Download

If you do not want to build yet or just want to test first, you can download example pre-compiled artifacts from Actions or from a self-hosted server.

We offer 2 types of extension sets for each PHP version:

WIP

Build Online (using GitHub Actions)

When the direct-download binaries above cannot meet your needs, you can use GitHub Actions to easily build a statically compiled PHP while defining your own extension list.

  1. Fork this repository.
  2. Go to the Actions of the project and select CI.
  3. Select Run workflow, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. bcmath,curl,mbstring)
  4. After waiting for the workflow to finish, open the corresponding run and download Artifacts.

If you enable debug, all logs will be output at build time, including compiled logs, for troubleshooting.

We are also planning to provide a reusable GitHub Actions workflow in the future, so that you can easily build static PHP in your own repository, without forking this project.

Contribution

If the extension you need is missing, you can create an issue. If you are familiar with this project, you are also welcome to initiate a pull request.

If you want to contribute documentation, please just edit in docs/.

Sponsor this project

You can sponsor me or my project from GitHub Sponsor. A portion of your donation will be used to maintain the static-php.dev server.

Special thanks to sponsors below:

JetBrains Logo

JetBrains provides core contributors with OSS Development Licenses

Open-Source License

This project itself is licensed under MIT. Some newly added extensions and dependencies may originate from other projects. The headers of those source files may also include additional LICENSE and AUTHOR information.

Please use the bin/spc dump-license command to export the open source licenses used in the project after compilation, and comply with the corresponding project's LICENSE.


All versions of static-php-cli with dependencies

PHP Build Version
Package Version
Requires php Version >= 8.3
ext-mbstring Version *
ext-zlib Version *
laravel/prompts Version ^0.1.12
symfony/console Version ^5.4 || ^6 || ^7
symfony/process Version ^7.2
symfony/yaml Version ^7.2
zhamao/logger Version ^1.1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package crazywhalecc/static-php-cli contains the following files

Loading the files please wait ...