Download the PHP package dragon-code/pretty-array without Composer

On this page you can find all versions of the php package dragon-code/pretty-array. 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 pretty-array

Pretty Array

Pretty Array

Stable Version Unstable Version Total Downloads Github Workflow Status

Simple conversion of an array to a pretty view.

Installation

To get the latest version of Pretty Array package, simply require the project using Composer:

Instead, you may of course manually update your require block and run composer update if you so choose:

Introduction

Q: Why did you create this package when there is a cooler symfony/var-exporter?

The big minus of package symfony/var-exporter is that it works differently with numeric keys.

For example, we have an array:

When exporting through it, the file will contain the following content:

Q: Why do you think this is bad?

This package has a framework-independent base. However, it was originally developed as an assistant for the Laravel Lang: HTTP Statuses package.

This package allows you to publish language translations of the HTTP Status Codes for the Laravel and Lumen frameworks.

A feature of the framework is that IDEs that help with development do not know how to read the numeric keys of arrays of translation files, so it was necessary to translate theminto a text equivalent.

This behavior includes http-statuses.php file:

The peculiarity of the package is that it takes the values of the source file and combines it with what is already in the application. Thus, the output is a file with numeric keys that IDE helpers cannot read:

Using

Source array for all examples:

Saving numeric keys without alignment

Result:

Saving string keys without alignment

Result:

Saving numeric keys with alignment

Result:

Saving string keys with alignment

Result:

Saving simple array

Result:

Change key case

Result:

The following options are available:

NO_CASE means that key register processing will not be performed.

Storing file

Result in stored file foo.php:

As JSON

Result in stored file foo.json:

License

This package is licensed under the MIT License.


All versions of pretty-array with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-dom Version *
ext-mbstring Version *
dragon-code/contracts Version ^2.20
dragon-code/support Version ^6.11.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 dragon-code/pretty-array contains the following files

Loading the files please wait ....