PHP/PHP함수

sprintf(), hash(), uniqid();

자연과벗하다 2017. 11. 13. 15:44

<?php

header("Content-Type: text/html; charset=UTF-8");


$data = sprintf("%04d%02d%02d",2017,8,02);

echo $data;


echo "<br />";

echo "<br />";

echo "<br />";


echo hash('MD5','test')."<br />";

echo hash('SHA256','test')."<br />";

echo hash('SHA256',uniqid(rand(),1))."<br />";





echo "<br />";

echo "<br />";

echo "<br />";


echo uniqid()."<br />";

echo uniqid("",1)."<br />";

echo uniqid(rand())."<br />";

echo uniqid(rand(),1)."<br />";

?>