Download the PHP package helloimalemur/rustify-php without Composer

On this page you can find all versions of the php package helloimalemur/rustify-php. 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 rustify-php

rustify-php

Rust-like Option and Result types for PHP 8+.

Fully compatible with typical PHP code

You can: • store Option or Result in arrays • return them from any function • use them as method return types • wrap exceptions with them • integrate with your Rust backend patterns (structural symmetry)

Option and Result behave like normal objects but with Rust semantics.

Install

Usage

Construct Options

Functional transforms:

Construct Results

Chaining:

Eager vs lazy fallbacks (orElseValue vs orElse)

There are two ways to provide a fallback for Option and Result:

Option example:

Result example (note: the lazy version receives the error):

Using Option and Result for API validation

Using helpers (if_some, if_ok)

Match-like helpers (option_match, result_match)

Catching and logging errors with Result/Option

You can keep exceptions out of your core flow by returning Result/Option and logging at the boundary (controller/CLI/job). Here are a few idioms you can mix and match:

Log errors without changing the value using ifErr

Transform or annotate the error while logging using mapErr

Recover from an error while logging using orElse

One‑liner logging with defaults using unwrapOrElse

Catch exceptions once, convert to Result, then log via the patterns above

Optional values: log when a value is missing using the ifNone pattern

WHY!?

Null is not a value. It is an absence of information. It carries zero context about what and why something is, where it came from or what state the system is in.

Option and Result turn absence into structured flow, explicit alternate paths, recoverable and predictable outcomes. They convey intent, preserve context, and shorten debugging time.

Option represents an intentional “maybe”:

Some(value) → a value is present
None → a value is intentionally absent

Result represents the outcome of an operation:

Ok(value) → the operation succeeded
Err(error) → the operation failed, with a meaningful reason

By using Option and Result, the purpose of a function becomes explicit.

They eliminate ambiguity, prevent silent failures, and preserve information that null would throw away.

it’s practical
it reduces bugs
it simplifies reasoning
it improves interfaces
it prevents hours of debugging
it’s how you write reliable APIs

This is not “Functional Programming nonsense”, this is industry standard.

Swift has Optional<T>
Kotlin has Nullable<T> with smart handling
Rust has Option<T> and Result<T,E>
Haskell, Elm, OCaml all use Maybe/Result
TypeScript uses | undefined but companies implement Option for safety

Null introduces silent ambiguity

Null can mean any number of different things, but the language gives you no way to distinguish them. It could signal an error, missing data, invalid input, or an uninitialized value—yet all of these collapse into the same opaque null.

Example:

What does null mean??? user not found?.. DB error?.. invalid input?.. developer forgot a return statement?.. exception swallowed somewhere?..

In production debugging, you cannot tell which one happened.

null destroys signal clarity.

Null forces defensive code everywhere

code you’ve written a thousand times:

Your brain has to constantly do “Is null okay here, or is null an error?” This cognitive cost multiplies across the codebase.

Null often fails far away from where the real problem happened

Consider: Fatal error: Call to a member function foo() on null. The real problem happened in a function 3 layers earlier, but the crash happened way later when dereferencing was attempted.

Option and Result prevent this entirely because they force handling.

Null causes production bugs that are extremely hard to trace

If $invoice was null, you get a warning or TypeError. But logs don’t tell why it was null. No context survives and you lose the root cause.

Result fixes this by carrying failure information forward:

You cannot lose the root cause.

Option makes “maybe” explicit

When something is optional, the type should say so, not the comments, not the mental model, not tribal knowledge.

Example:

Which one communicates meaning?

?string → maybe string, maybe null, maybe error, figure it out yourself
Option<string> → explicitly either Some(string) or None, handle both

Result replaces exceptions and null-return error codes with structured information

Exceptions in hot paths suck. null for errors is painful. Result gives a middle ground:

$result = doThing();

This is the same reason Go developers use error returns:

explicit
linear
predictable
no hidden control flow

Result makes success and failure equally obvious

Both outcomes are visible. No ambiguity. No surprises.

Developers get better autocomplete and static analysis

PHPStan/Psalm can reason about:

But they cannot reason about null except “maybe null, maybe not.”

So with Option/Result:

fewer runtime errors
more pre-runtime catches
more confident refactoring

All versions of rustify-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
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 helloimalemur/rustify-php contains the following files

Loading the files please wait ...