1--TEST--
2Test strlen() function :  error conditions
3--FILE--
4<?php
5
6/* Prototype  : int strlen  ( string $string  )
7 * Description: Get string length
8 * Source code: ext/standard/string.c
9*/
10
11echo "*** Testing strlen() : unexpected number of arguments ***";
12
13
14echo "\n-- Testing strlen() function with no arguments --\n";
15var_dump( strlen() );
16
17echo "\n-- Testing strlen() function with more than expected no. of arguments --\n";
18$extra_arg = 10;
19var_dump( strlen("abc def", $extra_arg) );
20?>
21===DONE===
22--EXPECTF--
23*** Testing strlen() : unexpected number of arguments ***
24-- Testing strlen() function with no arguments --
25
26Warning: strlen() expects exactly 1 parameter, 0 given in %s on line %d
27NULL
28
29-- Testing strlen() function with more than expected no. of arguments --
30
31Warning: strlen() expects exactly 1 parameter, 2 given in %s on line %d
32NULL
33===DONE===
34