Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


A sloth
So you're looking for a simple php framework? Tell me more about how simple it should be.

What is sloth-php?

Sloth-php is a php framework that was designed to be as simple and minimalistic as possible.
I've been working with php a lot over the past few years and I've often ran into situations, where I wanted to build a really small tool but was too lazy to build the underlying concepts over and over every time. After searching for small php frameworks, I've certainly found some good projects but thought they were pretty simple, they tend to be still a bit bloated or bad documented.
So instead of working into something new, I decided to just write something simple that I can personally use for small projects and document it to make it available for everybody.

Why should I use it?

  • It's a good way to kickstart development for really small applications
  • It's MVC structured, yet broken down to a minimum of restrictions for you
  • Sloths are awesome. No really, that might be the best reason why.

Documentation and stuff


sloth-php has been built to be as simple and small as possible. Though that, there are always things to improve. I broke with a lot of concepts tryint to break this down to a really simple framework and if you think something should be added, changed or removed, feel free to file a pull request or an issue report.
The framework has been built in mere three days and it sure is far from being perfect but ideal for the small projects I use it. Still, there's always things to improve.

Project goals

  • Restful routing
  • Allow user to set routes in the application
  • Use lambda-functions for before/after route hooks
  • Pass controller#method strings to defined lambdas
  • Controller actions linked to handle a route
  • Link a specific route to a controller action
  • Determine action based on requested format (html/json)
  • Rendering views
  • Render views based on the method called in the controller
  • Default view scaffolding for json replies
  • Preload storage for temp value storage between controller and view
  • Models
  • Database connectors and handlers
  • Query builder
  • App model system to access from controllers
  • Error handling
  • Catch errors and route to a custom error handling
  • Proper default error routes
  • Session handling
  • Simple global session handling
  • Full documentation of these few concepts


One week attempt at a simple, small, not-so-lame php framework







No releases published


No packages published