Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
futureplcPublic archive

About

Run PHP is a single command to assist in executing PHP code in a file.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Important

"Run PHP" is superceded by cpx exec

Run PHP

Latest Version on Packagist Total Downloads

Run PHP is a single command to assist in executing PHP code in a file.

The intention is to make it easier to execute "scratch files" when writing quick-and-dirty code, simply to save a little bit of time. It has 2 primary features that make it more useful than running a plain PHP interpreter:

  1. Automatic Autoloaders - When running a PHP file, it will automatically detect and use Composer's autoloader if it exists in the current directory or a parent directory
  2. Class Aliasing - If a class is used in the file that doesn't exist, it will attempt to alias it to a class in the autoloader

Installation

You can install the package via Composer:

composer global require futureplc/run-php

Usage

To run a PHP file with the script, just call the command and pass through a file path as a single argument:

run-php /path/to/file/to/run.php

License

The MIT License (MIT).

About

Run PHP is a single command to assist in executing PHP code in a file.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages