Download the PHP package mf/stringify without Composer

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

Stringify

Latest Stable Version Tests and linting Coverage Status

Simple and tiny class (function) to stringify anything in PHP.

Installation

Usage

By class and static method

By standalone function

Sprintf bonus

with a new %A placeholder for stringify function

Example

NOTE: values longer than 100 chars is shrinked to 100 chars with ... suffix

For easier examples, let's use a standalone function

Type PHP Result (string)
NULL stringify(null); null
bool stringify(true); true
bool stringify(false); false
string stringify(''); ""
string stringify('Some string'); "Some string"
int stringify(42); 42
float stringify(3.14); 3.14
array stringify([1, 2, 3]); [1, 2, 3]
array stringify(['foo' => 'bar']); ["foo" => "bar"]
array stringify(['person' => ['name' => 'Peter Parker'], 'alterego' => 'spider-man']); ["person" => ["name" => "Peter Parker"], "alterego" => "spider-man"]
object stringify(new \Foo\Bar()); Foo\Bar
object stringify(new \DateTime()); DateTime { 2018-11-15T10:20:30+00:00 }
object stringify(Seq::range('1..4')); MF\Collection\Immutable\Seq [1, 2, 3, 4]

Changelog

For latest changes see Semantic Versioning.

Contributing and development

Install dependencies

Run tests

For each pull-request, unit tests as well as static analysis and codestyle checks must pass.

To run all those checks execute:


All versions of stringify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 mf/stringify contains the following files

Loading the files please wait ....