Download the PHP package particle-academy/fancy-expr without Composer

On this page you can find all versions of the php package particle-academy/fancy-expr. 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 fancy-expr

fancy-expr

A sandboxed expression evaluator with one grammar and three implementations — TypeScript, PHP and Python — all asserted against the same fixture table.

Three implementations, one table:

TypeScript npm i @particle-academy/fancy-expr
PHP composer require particle-academy/fancy-expr
Python pip install fancy-expr (not on PyPI yet)

The one thing to know

An unresolved path is null. A malformed expression THROWS. Those are never the same value.

That distinction is the entire reason this package exists. Its absence cost a consumer a production workflow: a branch condition the engine could not evaluate returned null, null read as false, and the graph took the wrong road on every run — while reporting success, with no error and no log line.

Two halves of "cannot fire ⇒ cannot save"

parse() catches an expression that is not syntax. references() catches one that is valid syntax reading something that does not exist — it returns the root names an expression needs, sorted, with no data at all:

The allowlist is deliberately the host's. This package cannot know whether $now exists — $json, $input and $props are real in one host and meaningless in another. It answers what it can answer honestly and lets the host decide.

That came from a second field report: {{ $now }} rendered as nothing, because a $ root reads to an author as engine-provided and agents reach for $now / $today / $index the way they reach for the ones that exist. A real document shipped titled "Deal List Export -" with the date silently missing.

What it is not

Not a programming language. No user functions, no loops, no assignment, no method calls, no property access on host objects, no eval in any implementation. Expressions arrive from end users and from agents, over the wire; the sandbox is a security boundary rather than a style preference.

Why not an existing library

symfony/expression-language, expr-eval and simpleeval are all real, current, and the standard answer in their language. They also disagree with each other on truthiness, equality and coercion.

Adopting them would ship three subtly different languages under one syntax, and we would own neither side of the divergence. One grammar written three times against a shared fixture table is the only version that can be held to a contract.

Read next

GRAMMAR.md is the specification — the implementations follow it, not each other. It states the rules three languages would otherwise drift on: [] and {} are truthy, == and === are the same operator, &&/|| return the operand rather than a boolean, and .length is the one pseudo-property.


All versions of fancy-expr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
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 particle-academy/fancy-expr contains the following files

Loading the files please wait ...