The shortest PHP web framework possible

What is it?

ShortPHP is a ridiculously small, ultra-light open source PHP web framework released under [undecided] license. It is hacked together in as few lines of code as possible.

The goal

ShortPHP was designed to be the shortest, smallest, quickest web framework possible. The code is less than 4KB in size and currently is just undir 100 lines. In some ways you could say that it follows the MVC (Model-view-Controller) paradigm, but since it has no database-related code (it is 100% file-based) it's more of a VC (View-Controller) - It's up to the developer to use whatever tools he sees fit.

View the complete source (s.php)

"The code is ugly as hell, what are you doing???"

PHP code is ugly. Many people have said this and, to an extent, I agree. However you can make very good quality, "beautiful" PHP code. That was not this project's objective. The objective is to make the code work in a few lines as possible, with as little overhead as possible.

Why?

Web frameworks like Symfony, Code Igniter (which I'm a fan of), Ruby on Rails, Django and more are designed to give developers a good code base to build on and they include numerous classes, functions and utilities to use. They are great and recommended for almost anything.

I built ShortPHP because I constantly find myself building pure-HTML websites just needing a little bit of PHP here and there and a *tiny* bit of structure.

Download ShortPHP!
Version 1.1.1 - Beta (or something)

Features

  • Incredibly small: less than 8 KB download in size, 2-3 files, 2 folders
  • Easy to deploy: You just upload the files and start editing your content/files/php - no configuration neccessary - no database neccessary
  • Flexible: you can use it with any library you like. You can use it to build robust AJAX applications or simple 3-page pure text websites.
  • Secure: At least that's the goal - there isn't much code, so that should be reachable
  • E_STRICT compliant: High-quality ugly-code