note 20373 modified in function.str-repeat by hholzgra

From: Date: Wed, 17 Apr 2002 12:43:27 +0000
Subject: note 20373 modified in function.str-repeat by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29479@lists.php.net to get a copy of this message
heres a (function) handy use of str_repeat, to mask passwords :) $password = "password"; function mask_passwd($passwd) { return str_repeat("*", strlen($passwd)); } echo "So and so's password: " . mask_passwd($passwd); Editors note: even showing the length of a password is dangerous!!! --was-- heres a (function) handy use of str_repeat, to mask passwords :) $password = "password"; function mask_passwd($passwd) { return str_repeat("*", strlen($passwd)); } echo "So and so's password: " . mask_passwd($passwd); http://www.php.net/manual/en/function.str-repeat.php

« previous php.notes (#29479) next »