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(1mo ago)267↓50%1Apache-2.0ShellPHP &gt;=8.2CI failing

Since Feb 21Pushed 1mo 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 1mo 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/b84bc72d3228e8e8e46320ffe52ec8672cd7d48f3dc7499677a7c5ed6089e811/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656c656173652d302e302e362d6f72616e67652e737667)

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)

```
pie install kislayphp/core
```

```
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)

```
