It calculates the md5 hash of a string
Example
<?php
echo md5(“test”);
?>
Output
098f6bcd4621d373cade4e832627b4f6
It calculates the md5 hash of a string
Example
<?php
echo md5(“test”);
?>
Output
098f6bcd4621d373cade4e832627b4f6
It calculates the md5 hash of a given file
Example
<?php
echo md5_file(“test.txt”);
?>
Output
be6f273c2ae6f2740e395f525bf8b645
It strips whitespace from the beginning of a string
Example
<?php
echo ltrim(” phpcode”);
?>
Output
phpcode
It returns numeric formatting information
Example
<?php
print_r(localeconv());
?>
It calculate Levenshtein distance between two strings
Example
<?php
echo levenshtein(“phpcode”,”phpcodez”);
?>
Output
1
It make a string’s first character lowercase
Example
<?php
echo lcfirst(“PHPcode”);
?>
Output
pHPcode
Its an alias of implode() and joins array elements with a string
Example
<?php
$arry = array(“PHP”,”HTML”,”JS”);
echo join(“,”,$arry);
?>
Output
PHP,HTML,JS
It joins array elements with a string
Example
<?php
$arry = array(“PHP”,”HTML”,”JS”);
echo implode(“,”,$arry);
?>
Output
PHP,HTML,JS
It converts predefined characters to HTML entities. The predefined characters are:
Example
<?php echo htmlspecialchars("<a href='http://phpcodez.comt'>phpcode</a>"); ?>
Output
<a href=’http://phpcodez.comt’>phpcode</a>
It convert special HTML entities back to characters
Example
<?php
echo htmlspecialchars_decode(“<p>php >”);
?>
Output
php >