
- PHP 7 Tutorial
- PHP 7 - Home
- PHP 7 - Introduction
- PHP 7 - Performance
- PHP 7 - Environment Setup
- PHP 7 - Scalar Type Declarations
- PHP 7 - Return Type Declarations
- PHP 7 - Null Coalescing Operator
- PHP 7 - Spaceship Operator
- PHP 7 - Constant Arrays
- PHP 7 - Anonymous Classes
- PHP 7 - Closure::call()
- PHP 7 - Filtered unserialize()
- PHP 7 - IntlChar
- PHP 7 - CSPRNG
- PHP 7 - Expectations
- PHP 7 - use Statement
- PHP 7 - Error Handling
- PHP 7 - Integer Division
- PHP 7 - Session Options
- PHP 7 - Deprecated Features
- PHP 7 - Removed Extensions & SAPIs
- PHP 7 Useful Resources
- PHP 7 - Quick Guide
- PHP 7 - Useful Resources
- PHP 7 - Discussion
What do we mean by hash functions in PHP?
A hash function is any function that can be used to map data of arbitrary size to data of a fixed size. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes.
Syntax
string hash( string $algo , string $data [, bool $raw_output = FALSE ] )
Parameters
algo
Name of selected hashing algorithm (like "md5", "sha256", "haval160,4", etc..)
data
Message to be hashed.
raw_output
When setting to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
Example
<?php echo hash('sha256', 'Weelcome Tutorials Point'); ?>
Output
dacbedc476c664e457b165580dd5eb491bc027c914504066c51f56b1116d56e0
- Related Articles
- Hash Functions and Hash Tables
- What are Hash Functions in block chain?
- What do you mean by starch?
- What do you mean by adolescence?
- What do you mean by heat?
- What do you mean by Nutrition?
- What do you mean by tissue?
- What do you mean by environment?
- What do you mean by transpose?
- What do you mean by machine?
- What do you mean by cartilage?
- What do you mean by Mode?
- What do you mean by sward?
- What do you mean by thermometer?
- What do you mean by chemistry?

Advertisements