gitmyhub

cphalcon

PHP ★ 11k updated 7h ago

High performance, full-stack PHP framework delivered as a C extension.

Phalcon is a PHP web framework compiled as a C extension, giving you the familiar MVC structure of frameworks like Symfony at much higher speed and lower memory use because the framework runs at the PHP runtime level.

PHPCZephirsetup: moderatecomplexity 3/5

Phalcon is a web framework for PHP, which is a popular programming language used to build websites and web applications. What makes Phalcon unusual is how it is delivered: instead of being a set of PHP files you drop into your project like most frameworks, Phalcon is written in C and installed as a compiled extension directly into the PHP runtime. This means the framework code runs at a much lower level than typical PHP, which is why it can handle more requests with less memory and CPU than frameworks that live entirely in PHP userspace.

From the perspective of someone building a site, using Phalcon looks similar to other PHP frameworks. You write PHP code that uses classes for routing, database access, form handling, templating, and other common web tasks. The performance benefit comes transparently, because the framework itself is already compiled and loaded before your code even runs.

Installing Phalcon requires adding an extension to your PHP setup rather than just running a package manager command. The README covers three ways to do this: through PIE, which is a newer PHP extension installer; through PECL, which is the older standard tool for PHP extensions; or by compiling from source if you need a custom build. Once installed, it works on Windows, Linux, FreeBSD, and macOS.

The source code in this repository is written in a language called Zephir, which is a higher-level language that compiles down to C. This makes the codebase easier to work on than raw C while still producing a compiled extension. The project is open source under the BSD 3-Clause license and has been in active development since 2011.

Where it fits