mailmug / corefill
C-based Symfony polyfill alternative for PHP, delivering native performance.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Language:C
Type:php-ext
Ext name:ext-corefill
pkg:composer/mailmug/corefill
Requires
- php: ^8.0
This package is auto-updated.
Last update: 2025-12-24 03:44:09 UTC
README
Corefill is a high-performance C-based polyfill extension for PHP, designed to provide missing core functions, language features, and standard library behavior across different PHP versions β implemented natively in C for speed, consistency, and lower memory overhead.
Unlike userland polyfills written in PHP, Corefill operates at the Zend Engine level, offering near-native performance and deeper integration with PHP internals.
Why Corefill?
Popular polyfill libraries (such as Symfony Polyfills) are written in PHP. While extremely useful, they:
- Add runtime overhead
- Increase memory usage
- Cannot hook deeply into Zend internals
- Behave differently than true core implementations
Corefill solves this by implementing polyfills directly in C.
Key Advantages
- β‘ Native performance
- π§ Lower memory usage
- π§ Zend Engineβlevel integration
- π Consistent behavior across PHP versions
- π§© Drop-in replacement for missing core features
Goals
- Provide missing PHP core functions in older PHP versions
- Backport newer PHP features where feasible
- Offer consistent behavior across 8.x, and beyond
- Act as a foundation extension for other C extensions
- Reduce dependency on heavy userland polyfills
What Can Be Polyfilled?
Corefill focuses on features that are:
- Frequently polyfilled in PHP userland
- Performance-critical
- Safe to implement in C
Examples
- Missing core functions
- String helpers
- Array helpers
- Hash / crypto helpers
- Language behavior adjustments
- Internal constants
- Engine quirks across versions
Supported PHP Versions
| PHP Version | Status |
|---|---|
| PHP 8.0+ | β Supported |
| PHP 8.1+ | β Supported |
| PHP 8.2+ | β Supported |
| PHP 8.3+ | β Supported |
| PHP 8.4+ | β Supported |
| PHP 8.5+ | β Supported |
Installation
pie install mailmug/corefill
From Source
git clone https://github.com/yourname/corefill.git
cd corefill
phpize
./configure
make
sudo make install