1--TEST--
2Test long2ip() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string long2ip(int proper_address)
6 * Description: Converts an (IPv4) Internet network address into a string in Internet standard dotted format
7 * Source code: ext/standard/basic_functions.c
8 * Alias to functions:
9 */
10
11echo "*** Testing long2ip() : error conditions ***\n";
12
13// Zero arguments
14echo "\n-- Testing long2ip() function with Zero arguments --\n";
15var_dump( long2ip() );
16
17//Test long2ip with one more than the expected number of arguments
18echo "\n-- Testing long2ip() function with more than expected no. of arguments --\n";
19$proper_address = 10;
20$extra_arg = 10;
21var_dump( long2ip($proper_address, $extra_arg) );
22
23?>
24===DONE===
25--EXPECTF--
26*** Testing long2ip() : error conditions ***
27
28-- Testing long2ip() function with Zero arguments --
29
30Warning: long2ip() expects exactly 1 parameter, 0 given in %s on line %d
31NULL
32
33-- Testing long2ip() function with more than expected no. of arguments --
34
35Warning: long2ip() expects exactly 1 parameter, 2 given in %s on line %d
36NULL
37===DONE===