Download the PHP package php-filter/string without Composer

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

PHP String Filters

Minimum PHP Version Tests Latest Version GitHub

PHP String Filter is a library to perform character string transformation using a chain. You can use the most popular filters built into PHP and additional ones added by the author and community.

Support the following input data types: string, integer, float, boolean, null and object (must have a __toString method) Support the following output data types: string, int, float, bool and stringOrNull, intOrNull, floatOrNull

Installation

Install in your projects:

And use:

Filter list:

Filter Input Output
alnum() LLeMs!ZaF_F3dEX 4 LLeMsZaFF3dEX4
alnumWith('_') LLeMs!$%ZaF_F3dEX 4 LLeMsZaF_F3dEX4
append('Smith') John JohnSmith
camelize() primary-getallgroups-sys primaryGetallgroupsSys
extractBetween('<div>', '</div>') <div>test</div> test
htmlSpecialCharsDecode() &lt;a href=&quot;test&quot;&gt;Test&lt;/a&gt; <a href="test">Test</a>
htmlSpecialChars() <a href="test">Test</a> &lt;a href=&quot;test&quot;&gt;Test&lt;/a&gt;
letter() girl_123 girl
letterWith('_') girl_123! girl_
limit(4) this is this
lowerFirst() Big Ben big Ben
lower() Lucy Brown lucy brown
numeric() a123 123
numericWith('.') 10.31 zl 10.31
prepend('John ') Smith JohnSmith
removeMultipleSpaces() Replacing multiple spaces Replacing multiple spaces
remove(' Up Front') Big Design Up Front Big Design
repeat(3) test testtesttest
replaceRegex('/[^a-zA-Z0-9]/', '') Big-Design-Up-Front BigDesignUpFront
replace('Design Up Front', 'Ball Of Mud') Big Design Up Front Big Ball Of Mud
reverse() test tset
shuffle() test tset
stripHtml('<b>') <u><b>test</b></u> dsadsa
strPadLeft(12, '0'); 2/10/2020 0002/10/2020
strPadRight(12, '0'); 0002/10/2 0002/10/2000
substr(0, 4); test 123 test
trimLeft('.') .test test
trimRight('.') test. test
trim() test test
upperFirst() lucy Lucy
upper() lucy Brown LUCY BROWN
upperWords() lucy lue Lucy Lue
wordWrap(3, '</br>') Big Design Up Front Big</br>Design</br>Up</br>Front

Filter example:

For a list of filters and more examples of their application, see unit tests.

An example of a reusable filter grouping:

Example value output:

Example of value information:

Roadmap

License

PHP String Filters is released under the MIT License. See the bundled LICENSE file for details.

Author

@Miłosz Karolczyk


All versions of string with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-iconv Version *
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 php-filter/string contains the following files

Loading the files please wait ....