Download the PHP package swoole/php-nano without Composer

On this page you can find all versions of the php package swoole/php-nano. 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 php-nano

PHP Nano

php-nano is TypePHP's small native runtime. It preserves the PHP/Zend names and data structures needed by PHPX while removing the PHP interpreter, Zend VM, SAPI, and general operating-system service APIs. Its sources are compiled directly into a TypePHP native executable in place of libphp.

The compiler remains a build-time tool: PHP, Composer, and nikic/php-parser are not linked into the generated native program.

Runtime composition

PHP Nano vendors php-src extension source trees directly, including Core, date, hash, json, pcre, random, Reflection, SPL, standard, filter, URI, curl, and OpenSSL. TypePHP selects only the components used by a program and the transitive dependencies declared in composer.json; merely being present in php-nano does not add an extension to an executable. Extensions that are not part of php-src are installed with PIE as vendor packages. The final extension set is fixed at build time; dynamic libraries and runtime extension loading are not supported. The Zend INI registry and module-defined settings are retained, while automatic discovery/loading of php.ini remains disabled. Application file access does not imply runtime configuration or extension discovery.

The ctype_* functions are compiler intrinsics backed directly by PHPX and the C++ standard character-classification API. They do not require or register PHP's ctype extension.

PHPX high-precision values use the normal GMP, MPFR, and mpdecimal backends in a regular build. Nano instead compiles PHP 8.6's bundled libbcmath source as a private fallback backend, without registering the public bcmath extension or adding an external library dependency. Its documented precision differences are listed in SUPPORTED.md.

The normative dependency and capability rules are in CONSTRAINTS.md; its Native POSIX baseline, WASI subset, and forbidden host capabilities are defined in PORTABILITY_ALLOWLIST.md. See EXTENSIONS.md for the Composer package contract and upstream-source policy.

PHP Nano does not contain a copied PHPX facade. Composer installs the normal swoole/phpx sources beside this package. TypePHP compiles those sources with PHPX_NANO, which removes APIs such as eval, include, and require while keeping the existing PHPX value classes and implementation.

Build integration

This package deliberately has no independent production build system. It is installed by Composer and publishes an exact native source manifest in composer.json. TypePHP loads the listed sources directly into the application's source set. It compiles PHP .c files as C11, compiles PHPX and generated TypePHP sources as C++17, and performs the final link with the C++ linker.

The repository's CMakeLists.txt is only a CI/developer test harness. It reads the same Composer manifest, validates that every listed source exists, and compiles the dependency-free core into the php-nano-runtime test archive. Network transports, curl, and OpenSSL are selected and built by the consuming TypePHP application because their native SDKs are target-specific. Host builds also link php-nano-smoke and run it through CTest; WASI Preview 2 links the same smoke program and executes it with Wasmtime. iOS and Android CI compile-check the core archive without trying to execute a cross-compiled program. The smoke executable uses a non-dispatching test host for the two dynamic-call ABI hooks that PHPX implements in a real TypePHP program. It is not installed or invoked by TypePHP applications. There is no CMake, Autoconf, Automake, configure, or intermediate runtime archive in the native application build path. The current TypePHP source builder exposes the host-native and wasm32-wasip2 targets. CI exercises Linux and macOS host builds, WASI Preview 2 build/execution, plus iPhoneOS arm64 and Android arm64-v8a cross-compilation. Windows is intentionally not a php-nano runtime target: TypePHP uses its full PHP/PHPX DLL distribution and applies the Nano restrictions in the compiler.

No php-src tests/ directory or .phpt file is shipped. Nano's own small C++ smoke tests remain because they validate the source manifest and runtime ABI.

For a standalone repository check:


All versions of php-nano with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
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 swoole/php-nano contains the following files

Loading the files please wait ...