Download the PHP package nusje2000/strict-php without Composer

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

Strict PHP

Installation

Why?

This package was created because of the way the default php functions behave. A lot of functions return types that are not logical. This package wraps these functions and adds correct error handling and typing to these functions.

Functions

File functions

exists (replaces is_file)

To check if a file exists, you can use File::exists():

getContents (replaces file_get_contents)

To retrieve contents from a file, you can use File::getContents(). This function will return the contents and if not possible, an exception will be thrown.

putContents (replaces file_put_contents)

To write contents to a file, you can use File::putContents(). This function will always return the amount of bytes written and if not possible, an exception will be thrown.

Directory functions

exists (replaces is_dir)

To check if a directory exists, you can use Directory::exists().

Json functions

encode (replaces json_encode)

To encode a variable into json, you can use Json::encode(). This will always return the encoded string. If the encoding fails, an exception will be thrown.

decode (replaces json_decode)

To decode a json formatted string, you can use Json::decode(). This function has multiple return types.

decodeToObject (replaces json_decode)

If an object is expected as return type, decodeToObject can be used to both decode and assert that the output is an object. If the output is not an instance of stdClass, an exception will be thrown.

decodeToArray (replaces json_decode)

If an array is expected as return type, decodeToArray can be used to both decode and assert that the output is an array. If the output is not an array, an exception will be thrown.


All versions of strict-php with dependencies

PHP Build Version
Package Version
No informations.
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 nusje2000/strict-php contains the following files

Loading the files please wait ....