note 109507 added to function.similar-text
| From: | SPAMHATER | Date: | Mon, 23 Jul 2012 18:16:08 +0000 |
| Subject: | note 109507 added to function.similar-text | ||
| Groups: | php.notes php.notes | ||
| Request: | Send a blank email to php-notes+get-189375@lists.php.net to get a copy of this message | ||
Hey there,
Be aware when using this function, that the order of passing the strings is very important if you
want to calculate the percentage of similarity, in fact, altering the variables will give a very
different result, example :
$var_1 = 'PHP IS GREAT';
$var_2 = 'WITH MYSQL';
similar_text($var_1, $var_2, $percent);
echo $percent;
// 27.272727272727
similar_text($var_2, $var_1, $percent);
echo $percent;
// 18.181818181818
----
Server IP: 69.147.83.197
Probable Submitter: 41.141.151.146
----
Manual Page -- http://www.php.net/manual/en/function.similar-text.php
Edit -- https://master.php.net/note/edit/109507
Del: integrated -- https://master.php.net/note/delete/109507/integrated
Del: useless -- https://master.php.net/note/delete/109507/useless
Del: bad code -- https://master.php.net/note/delete/109507/bad+code
Del: spam -- https://master.php.net/note/delete/109507/spam
Del: non-english -- https://master.php.net/note/delete/109507/non-english
Del: in docs -- https://master.php.net/note/delete/109507/in+docs
Del: other reasons-- https://master.php.net/note/delete/109507
Reject -- https://master.php.net/note/reject/109507
Search -- https://master.php.net/manage/user-notes.php