1--TEST--
2Test getimagesize() function : error conditions - wrong number of args
3--FILE--
4<?php
5/* Prototype  : proto array getimagesize(string imagefile [, array info])
6 * Description: Get the size of an image as 4-element array
7 * Source code: ext/standard/image.c
8 * Alias to functions:
9 */
10
11echo "*** Testing getimagesize() : error conditions ***\n";
12
13// Zero arguments
14echo "\n-- Testing getimagesize() function with Zero arguments --\n";
15var_dump( getimagesize() );
16
17//Test getimagesize with one more than the expected number of arguments
18echo "\n-- Testing getimagesize() function with more than expected no. of arguments --\n";
19$imagefile = 'string_val';
20$info = array(1, 2);
21$extra_arg = 10;
22var_dump( getimagesize($imagefile, $info, $extra_arg) );
23
24?>
25===DONE===
26--EXPECTF--
27*** Testing getimagesize() : error conditions ***
28
29-- Testing getimagesize() function with Zero arguments --
30
31Warning: getimagesize() expects at least 1 parameter, 0 given in %s on line %d
32NULL
33
34-- Testing getimagesize() function with more than expected no. of arguments --
35
36Warning: getimagesize() expects at most 2 parameters, 3 given in %s on line %d
37NULL
38===DONE===