for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Strings normalization functions
*
* @category helper functions
* @package Normie
* @author David J Eddy <[email protected]>
* @license MIT
* @link https://github.com/davidjeddy/normie
*/
* Swapping $delimiter and $string positions
* @param string $string
* @param string $delimiter
* @param int $limit
* @return array<int, string>|false
function norm_explode(string $string, string $delimiter, $limit = PHP_INT_MAX)
{
return explode($delimiter, $string, $limit);
}
* Swapping $glue and $pieces positions
* @param array $pieces
* @param string $glue
* @return string
function norm_implode(array $pieces, string $glue): string
return implode($glue, $pieces);
function norm_join(array $pieces, string $glue): string
* @param mixed $subject
* @param mixed $search
* @param mixed $replace
* @param integer $count
* @return mixed
function norm_str_replace($subject, $search, $replace, $count = 1)
return str_replace($search, $replace, $subject, $count);
* Added return value.
* @param array $result
* @return array
function norm_parse_str(string $string, array &$result): array
parse_str($string, $result);
return $result;