PHPackages                             kislayphp/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kislayphp/core

ActivePhp-ext[API Development](/categories/api)

kislayphp/core
==============

High-performance C++ PHP extension providing HTTP/HTTPS server with routing and middleware for PHP microservices

0.0.10(3mo ago)272↓92.9%1Apache-2.0C++PHP &gt;=8.2CI failing

Since Feb 21Pushed 3w agoCompare

[ Source](https://github.com/KislayPHP/core)[ Packagist](https://packagist.org/packages/kislayphp/core)[ Docs](https://github.com/KislayPHP/core)[ RSS](/packages/kislayphp-core/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (13)Used By (1)

Kislay Core
===========

[](#kislay-core)

[![PHP Version](https://camo.githubusercontent.com/5fe05c705bf034839bda7651781e4d0a9d42f4a840478ca5e343873a0361bb89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/109222cb0d1f59ed2e77b56722653623fa45f93e2bb201a6eef8561d26a52185/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d677265656e2e737667)](LICENSE)![Release](https://camo.githubusercontent.com/4ea8ae09d0e480516cb524e6297291c48ea957ff2e2591fad6c55c8980ad5b4f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656c656173652d302e302e31302d6f72616e67652e737667)

Kislay Core is the HTTP runtime for the KislayPHP ecosystem. It provides the embedded HTTP/HTTPS server, strict segment router, request/response lifecycle, middleware, async bridge, and Promise primitives used by the higher-level modules.

Install
-------

[](#install)

Prerequisites for PIE/source builds:

- macOS (Homebrew): `brew install libuv`
- Debian/Ubuntu: install the development packages for `libuv`, `curl`, and OpenSSL

Ubuntu 24.04 reference flow used for the release verification:

```
sudo apt-get update
sudo apt-get install -y pkg-config libcurl4-openssl-dev libssl-dev libuv1-dev
```

```
pie install kislayphp/core:0.0.10
```

Automation note:

- in a non-interactive automation session on macOS, PIE may stop after the build step because the final copy still goes through `sudo`
- the built module can still be validated directly from the PIE working directory before the final interactive install step

```
extension=kislayphp_extension.so
```

Build from source:

```
git clone https://github.com/KislayPHP/core.git
cd core
phpize
./configure --enable-kislayphp_extension
make -j4
sudo make install
```

Runtime contract
----------------

[](#runtime-contract)

- Routes support only static segments and `:param` segments.
- Regex-style routes and wildcard route fragments are rejected at registration time.
- Middleware uses `function ($req, $res)` and must return a truthy value to continue.
- Query/body parsing is lazy.
- `listenAsync()` requires ZTS. On NTS, run `listen()` in its own process.
- `AsyncHttp` self-requests are rejected in single PHP runtime mode to avoid deadlocks.

Quick start
-----------

[](#quick-start)

```
