PHPackages                             scherbak-electronics/php-app-template - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. scherbak-electronics/php-app-template

ActiveProject[Utility &amp; Helpers](/categories/utility)

scherbak-electronics/php-app-template
=====================================

A super minimalistic PHP application template with ready-to-use Composer autoloading.

v1.0.2(2y ago)09MITPHP

Since Jun 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/scherbak-electronics/php-app-template)[ Packagist](https://packagist.org/packages/scherbak-electronics/php-app-template)[ RSS](/packages/scherbak-electronics-php-app-template/feed)WikiDiscussions main Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

PHP Application Template
========================

[](#php-application-template)

This is as minimal as possible PHP application template designed to provide a basic project structure with Composer autoloading configured. It is ideal for super small minimalistic projects or scripts that require a clean, ultra-minimal setup with the capability to expand as needed.

Features
--------

[](#features)

- **Minimal Setup**: Only two files (`composer.json` and `main.php`) are initially present.
- **Composer Autoloading**: PSR-4 autoloading is configured, ready for you to add classes under the `src/` directory.

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

[](#getting-started)

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

[](#prerequisites)

You need to have Composer installed on your system to work with this project template. You can download and install Composer by following the instructions on the [official Composer website](https://getcomposer.org/download/).

### Installing

[](#installing)

To start a new project based on this template, run the following command:

```
composer create-project scherbak-electronics/php-app-template path/to/your-new-project
```

### Structure

[](#structure)

- `src/`: Directory where your PHP classes should be placed (following the `App\` namespace).
- `main.php`: A simple PHP script to demonstrate the setup. Modify or expand it as needed. To facilitate direct execution of the script from the command line, please include the shebang line `#!/usr/bin/env php` at the beginning of this file.

### Usage

[](#usage)

After installation, you can start adding your PHP classes in the `src/` directory. For example, to add a new class `Example`, create a file `src/Example.php` with the following content:

```
