Download the PHP package smuuf/primi without Composer

On this page you can find all versions of the php package smuuf/primi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package primi

Primi

Primi

A scripting language written in PHP & interpreted in PHP.

Primi is meant for PHP developers who want to allow their clients to write their own custom logic. Primi allows you (the developer) to execute untrusted code (provided simply as a string) inside a sandbox, safely separated from its surroundings.


Code Climate Packagist
Maintainability Test Coverage Latest Stable Version License Total Downloads

Quick access

Rationale

Primi - as things sometimes go in life - began as an answer to a practical problem: I needed some general-purpose (ie. not too much domain-specific) scripting language that my other app's users could use to write their simple custom logic. I needed some universally usable and primitive scripting thing, with familiar syntax (PHP-like x C-like x JS-like) and one that could be safely executed inside pure PHP environment (no external depedencies on v8js, v8 and whatnot - meaning Javascript is out of the game...).

Thus, Primi was (mostly as an experiment) created.

Installation

You can either use Primi as a in your own projects (b) by installing it as a Composer dependency.

You'll want either one of these:

a) Standalone installation

  1. Clone this repo.
    • git clone https://github.com/smuuf/primi.git
  2. Install Composer dependencies.
    • composer install
  3. Run something with Primi CLI.
    • chmod +x ./primi && ./primi -s -c "a = 1 + 2 / 3;"

Convenient installation Oneliner™:

Extra stuff:

b) Using Primi as a library

  1. First, install Primi Composer package: composer require smuuf/primi
  2. Then use it like this:

Running this code would output:

REPL mode

Primi provides a convenient "sandbox" REPL mode which is launched by executing ./primi without any argument. You can use this for messing around with the language or to test any new stuff you might be trying to implement (e.g. your own Primi extensions written in PHP).

REPL example usage

In this mode, all statements are executed when entered and the result value of the last expression is returned. REPL commands history is preserved between separate sessions (history is stored in ~/.primi_history file).

Language reference

The basics of the language syntax and data types are found here: https://github.com/smuuf/primi/blob/master/docs/language_reference.md


All versions of primi with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
smuuf/php-peg Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smuuf/primi contains the following files

Loading the files please wait ....