PHPackages                             kengoldfarb/underscore\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. kengoldfarb/underscore\_php

ActiveLibrary[Framework](/categories/framework)

kengoldfarb/underscore\_php
===========================

\_php - a lightweight MVC structure. Designed to provide the basics or allow you to change it. Emphasis on speed with routing done at the webserver (apache) layer.

1.0.0(13y ago)014[1 issues](https://github.com/kengoldfarb/underscore_php/issues)GNU General Public License Version 3JavaScriptPHP &gt;=5.3.0

Since Feb 2Pushed 13y ago1 watchersCompare

[ Source](https://github.com/kengoldfarb/underscore_php)[ Packagist](https://packagist.org/packages/kengoldfarb/underscore_php)[ Docs](http://underscorephp.com)[ RSS](/packages/kengoldfarb-underscore-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

\_PHP - a lightweight php framework
===================================

[](#_php---a-lightweight-php-framework)

Installation
------------

[](#installation)

### Composer

[](#composer)

The easiest way to install is by using [Composer](http://getcomposer.org)

In your composer.json file:

```
{
	"require": {
		"php": ">=5.3.0",
		"kengoldfarb/underscore_php": "1.*",
	}
}
```

Alternately, you can just [Download the source](https://github.com/kengoldfarb/underscore_php/tags)

Getting Started
---------------

[](#getting-started)

This framework follows the MVC pattern with all routing occuring at the webserver level.

> The best way to enjoy \_PHP is by using it in conjunction with [\_Libs](https://github.com/kengoldfarb/underscore_libs) which can be installed by composer (this is there by default)

```
{
	"require": {
		"php": ">=5.3.0",
		"kengoldfarb/underscore_libs": "1.*",
	}
}
```

### Controllers (and basic routing)

[](#controllers-and-basic-routing)

Creating friendly urls is easy.

`http://localhost/` maps to `controllers/defaultController.php [action=index]`

`http://localhost/hellothere` maps to `controllers/defaultController.php [action=hellothere]`

`http://localhost/lists` maps to `controllers/listsController.php [action=index]`

`http://localhost/lists/add-list` maps to `controllers/listsController.php [action=add-list]`

and so on...

Just check out controllers/defaultController.php for examples.

> For custom routing check out the .htaccess file and the nginx example config file

### Models

[](#models)

Models should be created in models/ and then used normally

```
require_once _MODELS . 'MyModel.php';
$myModel = new MyModel();
```

### Views

[](#views)

Views are included by the controller. This allows you a lot of flexibility to create layouts as you see fit.

```
include _VIEWS . 'header.php';
include _VIEWS . 'myview.php';
include _VIEWS . 'footer.php';
```

See the views/ directory and defaultController.php for examples

### Config

[](#config)

#### Environments

[](#environments)

Environment specific configuration options can be defined in files located in `src/env/`

Mapping your server name to an environment happens in `src/config/environments.php`

#### Constants

[](#constants)

\_PHP defines some handy constants that can be used throughout your code.

`_WEBROOT` The full path to the web root directory (/path/to/project/src/www)

`_MODELS` The full path to the web root directory (/path/to/project/src/www/models)

`_CONTROLLERS` The full path to the web root directory (/path/to/project/src/www/controllers)

`_VIEWS` The full path to the web root directory (/path/to/project/src/www/views)

#### Versioning

[](#versioning)

You can set a version in the `src/config/version.php` file. This is particularly useful for cache busting.

Anything that comes in with a version number will be routed to the corresponding location.

For example:

`http://local.underscorephp.com/v1.2.3/css/bootstrap-responsive.css` is the same as `http://local.underscorephp.com/css/bootstrap-responsive.css`

`http://local.underscorephp.com/v1.2.3/underscore_php` is the same as `http://local.underscorephp.com/underscore_php`

### Webserver Config

[](#webserver-config)

Check out the .htaccess file for apache. Nginx coming soon...

License
-------

[](#license)

[GNU General Public License Version 3](http://www.gnu.org/licenses/gpl.html)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2693ebaacdf72f34dc86a5b07d532f7c80076a3533a00c28ee179eda2b96d42?d=identicon)[kengoldfarb](/maintainers/kengoldfarb)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kengoldfarb-underscore-php/health.svg)

```
[![Health](https://phpackages.com/badges/kengoldfarb-underscore-php/health.svg)](https://phpackages.com/packages/kengoldfarb-underscore-php)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
