1--TEST--
2similar_text(), basic tests
3--CREDITS--
4Mats Lindh <mats at lindh.no>
5#Testfest php.no
6--INI--
7precision=14
8--FILE--
9<?php
10var_dump(similar_text("abcdefgh", "efg"));
11var_dump(similar_text("abcdefgh", "mno"));
12var_dump(similar_text("abcdefghcc", "c"));
13var_dump(similar_text("abcdefghabcdef", "zzzzabcdefggg"));
14
15$percent = 0;
16similar_text("abcdefgh", "efg", $percent);
17var_dump($percent);
18similar_text("abcdefgh", "mno", $percent);
19var_dump($percent);
20similar_text("abcdefghcc", "c", $percent);
21var_dump($percent);
22similar_text("abcdefghabcdef", "zzzzabcdefggg", $percent);
23var_dump($percent);
24?>
25--EXPECT--
26int(3)
27int(0)
28int(1)
29int(7)
30float(54.54545454545455)
31float(0)
32float(18.181818181818183)
33float(51.851851851851855)
34