1--TEST--
2similar_text(), error tests for missing parameters
3--CREDITS--
4Mats Lindh <mats at lindh.no>
5#Testfest php.no
6--FILE--
7<?php
8/* Prototype  : proto int similar_text(string str1, string str2 [, float percent])
9* Description: Calculates the similarity between two strings
10* Source code: ext/standard/string.c
11*/
12
13$extra_arg = 10;
14echo "\n-- Testing similar_text() function with more than expected no. of arguments --\n";
15similar_text("abc", "def", $percent, $extra_arg);
16
17echo "\n-- Testing similar_text() function with less than expected no. of arguments --\n";
18similar_text("abc");
19?>
20===DONE===
21--EXPECTF--
22-- Testing similar_text() function with more than expected no. of arguments --
23
24Warning: similar_text() expects at most 3 parameters, 4 given in %s on line %d
25
26-- Testing similar_text() function with less than expected no. of arguments --
27
28Warning: similar_text() expects at least 2 parameters, 1 given in %s on line %d
29===DONE===
30