Download the PHP package basteyy/php-stringer without Composer

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

basteyy`s PHP Stringer Package

Every developer knows the drill: Here I need a random string, there I have to generate a URL from an input, and then I want to find out how long ago an event was. This package bundles a few functions that I constantly need in my projects. You are welcome to contribute and expand it.

Installation

Usage

To use the basteyy\php-stringer package in your projects, here are some examples with their expected outputs:

String Mainiplation

Escape String

For safe output of strings in an HTML context, use escapeString:

Generate Hash Sum

Create a hash sum of a string (default algorithm is SHA256) using getStringHashSum:

Remove Double Slashes

Use remove_double_slashes to clean up file paths or URLs:

Slugify Text

Convert a string into a URL-optimized version with getSlugifiedText:

Slugify (Deprecated)

For backward compatibility, slugify is still available but is deprecated. It functions the same as getSlugifiedText:

Random String Generation

Generate Alphanumeric String

Generate Numeric String

Generate Alphabet String

Generate String with Custom Characters:

Create memorable password

The createMemorablePassword function in the basteyy\Stringer library generates passwords that are easier to remember, combining words, numbers, and symbols. This function is not cryptographically secure and is more suitable for user-friendly passwords rather than high-security purposes.

In this example, the function generates a password with:

The output will be a string like apple7%cloud4*, making it memorable yet unique. You can adjust the counts of words, numbers, and symbols as needed.

Attention: The function createMemorablePassword is not cryptographically secure and should not be used for high-security.

Time Manipulation

Get Nice Time Ago

getNiceTimeAgo function returns a human-readable time difference from the current time to the provided DateTime.

These examples showcase the versatility of the getNiceTimeAgo function, providing options for exact time intervals, custom unit names, and localization.


All versions of php-stringer 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 basteyy/php-stringer contains the following files

Loading the files please wait ....