Traitify is a PHP extension that brings native, high-performance traits, such as Singleton, to PHP using C. Itβs faster, lighter, and designed for real-world use in modern PHP apps.
π§ Features
β Traitify\Singleton trait in C
β Automatic getInstance() handling
β Full __construct() support
π Skips PHP overhead
π§ Extensible: add Macroable, Singleton, etc.
π¦ Install
git clone https://github.com/arshidkv12/traitify.git
cd traitify
phpize
./configure --enable-traitify
make && sudo make install
Enable in php.ini:
extension=traitify
β Why Use It?
- Faster than PHP traits
- Less memory usage
- Clean API
- Ideal
- for performance-critical apps
π GitHub: github.com/arshidkv12/traitify
Fork it. Test it. Extend it.
Top comments (0)