>
Open Source

seventeen free PHP web frameworks, ranked by where they fit

PHP has been the scaffolding of the open web for so long that “use a framework”
is more or less the default answer when someone asks how to start a new web
project. The choice of which framework is harder, because the long tail of
options means you can spend a week reading comparison posts before you write a
line of code. After fifteen years of watching teams pick one and then regret
it, the more useful question is not “which is best” but “which matches what
you are actually building.”

This guide walks through seventeen free and open source PHP web frameworks
(Laravel, Symfony, CodeIgniter, CakePHP, Yii, Phalcon, and the rest of the
list) and sorts them by the kind of project each one is built for. None of
these are bad choices. They each made a deliberate bet about what a PHP web
project is, and the bet has aged differently depending on the workload.

The decision that comes before the framework choice

A framework is a reusable code library that handles the parts of a web app
that look the same in every project: routing, sessions, database access,
templating. The point of using one is to skip that plumbing so the team can
focus on the parts that are actually new. The trade is that you let the
framework shape portions of your application. It is perfectly possible to
write a PHP web app without a framework, but for anything beyond a landing
page the time savings are worth the learning curve.

The first thing to sort out is the size of the project. A landing page and a
contact form do not need the same machinery as a multi-tenant SaaS app, and
the PHP framework world reflects that spectrum: full-stack frameworks with
everything included, micro-frameworks that stay out of your way, and
component libraries that pick up specific jobs without committing to a
particular app structure.

The full-stack options

Full-stack frameworks give you routing, ORM (object-relational mapping, a
layer that turns database tables into PHP objects you can read and write),
templating, authentication, and a CLI toolchain out of the box. The price is
that you adopt their conventions, and rewriting later means rewriting most of
your app.

Laravel is the most prominent member of this group. It pairs expressive routing with the Eloquent ORM, a Blade templating engine, and a community of contributors that publishes drop-in packages for almost anything you would otherwise build yourself. Teams that already know Laravel or want to hire easily default to it.

Symfony sits at the same end of the spectrum but with a different philosophy.
It is built on a set of reusable components (the HTTP foundation, the console
layer, the dependency injection container) that other frameworks and packages
also consume. If your team values long-term stability over a fast on-ramp,
Symfony’s track record is hard to beat.

CakePHP is the older of the three, originally inspired by Ruby on Rails. Its
convention-over-configuration stance means there is less ceremony for the
common cases, and its codebase has been around long enough that most patterns
are documented somewhere.

Yii is a high-performance, component-based framework with a strong
code-generation story. It is a good fit for backend-heavy apps where the
front-end rendering is light and the data model is the bulk of the work.

CodeIgniter keeps the footprint small. If you have read PHP in anger for years
and want a framework that does not hide PHP from you, CodeIgniter is the
closest mainstream option to “PHP with batteries included but no surprises.”

Phalcon is the outlier in this group. It is delivered as a C extension
(installed once per server) and the framework itself runs as compiled code
rather than interpreted PHP. For high-throughput APIs the speedup is real,
though you give up the easy “drop in a new PHP package” workflow.

The modern newcomers

Tempest, Spiral, and a handful of newer entries treat the modern PHP stack
(strict types, fibers, readonly classes) as the baseline rather than the
goal. Tempest bills itself as a modern PHP framework for building full-stack
web applications, and its design leans on PHP 8.2+ features that older
frameworks only adopted later. Spiral is similar in spirit and tends to
attract teams that already think in terms of long-running workers and event
sourcing.

SilverStripe straddles the line between framework and CMS. If you are building a content-heavy site where the editorial workflow matters as much as the templating, SilverStripe gives you both pieces in one package.

The micro-frameworks and the small-footprint tools

For APIs, single-page-app backends, and the kind of project where you want a
router and a request/response abstraction and nothing else, the micro-framework
tier is the right place to look.

Fat-Free is the most established entry here. It is small enough to read in an
afternoon, ships with a templating engine and an ORM, and is friendly to
projects that want to grow without forcing a framework migration.

Mako and the Smart Framework cluster around the same niche with different
ergonomic choices. The honest pitch for any of them is the same: you get a
toolkit, not a structure, and the discipline is yours to keep.

Nette Framework is a family of mature, stand-alone PHP components that can
also be assembled into a full application. The same is true of Laminas, which
descended from the Zend Framework project and is best understood as a
collection of enterprise-ready components and middleware rather than a single
opinionated stack.

Pop PHP is a toolkit for rapid application development that predates several
of the others on this list. It is worth a look for teams that have run into
its component model before and want to lean into it.

PHPixie and Koseven round out the smaller-footprint options. PHPixie is a modern, component-based framework that ships with its own ORM and routing layer. Koseven is an object-oriented HMVC framework (hierarchical model-view-controller, an extension that lets sub-controllers handle sub-requests without leaving the parent request) that carries the HMVC pattern into PHP in a way most other frameworks do not.

What to actually do with this list

A short decision rubric that tends to survive contact with real projects:

  • Pick Laravel if you want the largest hiring pool and the broadest package catalog.
  • Pick Symfony if you value stability over speed of adoption, or if you need components that other code can consume independently.
  • Pick CakePHP or CodeIgniter if your team is comfortable with PHP and you want a framework that stays out of your way.
  • Pick Yii if the data layer is the bulk of the work and code generation is welcome.
  • Pick Phalcon if the workload is throughput-bound and you can install a C extension on every server that runs the app.
  • Pick a micro-framework (Fat-Free, Mako, or one of the smaller ones) if you are building an API or a single-page-app backend and want minimum ceremony.
  • Pick a component library (Laminas, Nette, the Symfony components on their own) if you only need specific pieces and do not want a full app structure.

Trade-offs

The first trade is productivity versus portability. A full-stack framework
gives you a CLI, an ORM, and a templating engine, but you commit to its
upgrade cadence and its conventions. Migrating to a different framework later
means rewriting most of the application. The second trade is performance
versus convenience. Phalcon and Yii give you a measurable speedup over
interpreted PHP frameworks, but you give up the drop-in package workflow that
the larger community enjoys. The third trade is community size versus
fit-for-purpose. Laravel has the broadest community and the largest package
catalog, which means easier hiring and more Stack Overflow answers. The
smaller frameworks (Tempest, Spiral, Koseven) tend to have tighter designs
and a more focused community, but you will be reading source code more often
than copy-pasting from a tutorial.

What I would tell past me

The honest answer to “which PHP framework” is rarely “the one with the most
GitHub stars.” It is “the one that matches the size and shape of what you are
building.” If you can describe the project in one paragraph, a micro-framework
will keep you fast. If the project has roles, billing, multi-tenancy, and a
CMS-shaped data model, a full-stack framework earns its keep. The list above
is not a ranking. It is a set of options that each made a bet about what a PHP
web project looks like, and the bet that matches your project is the one to
take.

A few practical notes from real setups:

  • The framework choice gets cheaper to change early in a project and much more expensive after authentication, billing, and the data model are committed, so make the choice before those land, not after.
  • Read the framework’s upgrade policy, not just its current version. Some of the older entries on this list have stayed current through clean major upgrades, while others have rotted quietly, so the upgrade story matters more than the current speed benchmark.
  • The framework with the largest community is not always the one with the right community. Laravel’s community is broad and shallow in places; the Symfony and Yii communities are narrower and deeper, and both shapes are valid.
  • Component libraries (Laminas, Nette, the Symfony components on their own) are a real third option between a full framework and a micro-framework, and they get underused because the boundary between them and the full frameworks is blurry.

Leave a comment