PHPackages                             johnniewalker/example-php-cli-application - 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. [CLI &amp; Console](/categories/cli)
4. /
5. johnniewalker/example-php-cli-application

ActiveLibrary[CLI &amp; Console](/categories/cli)

johnniewalker/example-php-cli-application
=========================================

Example of a nice CLI Application in PHP for a job interview. Kept as a reminder.

v0.0.3(8y ago)04.0k[1 issues](https://github.com/johnniewalker/example-php-cli-application/issues)ApachePHPPHP &gt;=5.2.9

Since Dec 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/johnniewalker/example-php-cli-application)[ Packagist](https://packagist.org/packages/johnniewalker/example-php-cli-application)[ Docs](https://github.com/johnniewalker/example-php-cli-application)[ RSS](/packages/johnniewalker-example-php-cli-application/feed)WikiDiscussions master Synced 2d ago

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

---

= Say Dal - The Data Access Layer Generation Utility =

\[Based on Say Pay - The Payroll Date Generation Utility\]

---

== Quick Start ==

Check the configuration:

1. Open the file, "saydal\\saydal\\saydal.php" in a text editor
2. Check the locale and timezone settings are correct for your needs

Usage:

This is a command line utility that outputs a Comma-Separated Values (CSV) file containing the sales department payment dates for the remainder of this year.

```
Usage:
saydal.php

 is the destination path and filename where the CSV data is written to.

Example:
php saydal.php myfile.csv

Where:
	'php' - is the interpreter that runs the script.
	'saydal.php' - the utility script
	'myfile.csv' - is the name of the file that you wish to write-to

Note: The filepath that you provide must not exist already. Otherwise an error will be shown.

```

== Requirements ==

- PHP 5

The code has been tested extensively on two platforms throughout development:

- Windows XP - running PHP 5.2.9 (cli)
- Ubuntu 10.04 LTS (the Lucid Lynx) - PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli)

The code has recently been run on PHP 7.1.7.

It does not rely on any other libraries or frameworks to function.

== "Minimal" versus "Standard" Versions \*\*\*

If you have got the "Minimal Version" then you will not find any "unit tests" or "extras". Otherwise, the unit tests are included in the version. They were run using the SimpleTest Testing Framework 1.0.1 which would be included with the test cases.

\*\*\* About the project \*\*\*

The main parts in the project:

src/ saydal.php - the main bootstrap for the application Controller/ MainController.php - the main control code for the application Library/ CLIFeedback.php - view handle for writing user feedback and error messages CSVFile.php - the object that represent the CSV file Model/ PayrollCalendarMonth.php - the object that represents the PayrollMonth View/ Help.php - a text file containing user help for the cli output

We also expect the Simpletest (simpletest\_1.1.0) library for testing. This should be installed via specification in the project's `composer.json` file. Our TestRunner.php expects the Simpletest library to be at:

vendor/ - 3rd party libraries that are not shipped with the project. simpletest/ simpletest/ - [Simplest testing libary current release: SimpleTest v1.1.0.](http://simpletest.org/en/download.html)

== Standard Version Only ==

Running Tests from the Command Line

First, create a config file that sets the include path to the main application folder, call it:

```
tests\Config\IncludePathsConfig.ini

```

This info helps the `TestRunner.php` to set the base include path.

Then, point your command line interface to:

saydal\\saydal\\Tests\\TestRunner.php

Then run:

php TestRunner.php
==================

[](#php-testrunnerphp)

Some tests create files in 'TempData' directories. The files can be deleted but don't delete those directories.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.3% of commits — single point of failure

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

Every ~0 days

Total

2

Last Release

3114d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/605112?v=4)[Johnnie Walker](/maintainers/johnniewalker)[@johnniewalker](https://github.com/johnniewalker)

---

Top Contributors

[![john-arcus](https://avatars.githubusercontent.com/u/32770045?v=4)](https://github.com/john-arcus "john-arcus (17 commits)")[![johnniewalker](https://avatars.githubusercontent.com/u/605112?v=4)](https://github.com/johnniewalker "johnniewalker (5 commits)")

---

Tags

cliexample

### Embed Badge

![Health badge](/badges/johnniewalker-example-php-cli-application/health.svg)

```
[![Health](https://phpackages.com/badges/johnniewalker-example-php-cli-application/health.svg)](https://phpackages.com/packages/johnniewalker-example-php-cli-application)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.4k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.7k357.7M10.6k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k260.6M370](/packages/nunomaduro-termwind)[wp-cli/wp-cli

WP-CLI framework

5.1k18.5M394](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68227.8M374](/packages/wp-cli-php-cli-tools)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1348.3k1](/packages/socialengine-sniffer-rules)

PHPackages © 2026

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