1--TEST--
2Test get_resource_type() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string get_resource_type  ( resource $handle  )
6 * Description:  Returns the resource type
7 * Source code: Zend/zend_builtin_functions.c
8 */
9
10echo "*** Testing get_resource_type() : error conditions ***\n";
11
12echo "\n-- Testing get_resource_type() function with Zero arguments --\n";
13var_dump( get_resource_type() );
14
15echo "\n-- Testing get_resource_type() function with more than expected no. of arguments --\n";
16$res = fopen(__FILE__, "r");
17$extra_arg = 10;
18var_dump( get_resource_type($res, $extra_arg) );
19
20?>
21===DONE===
22--EXPECTF--
23*** Testing get_resource_type() : error conditions ***
24
25-- Testing get_resource_type() function with Zero arguments --
26
27Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d
28NULL
29
30-- Testing get_resource_type() function with more than expected no. of arguments --
31
32Warning: get_resource_type() expects exactly 1 parameter, 2 given in %s on line %d
33NULL
34===DONE===