1--TEST--
2Test function get_cfg_var() by substituting argument 1 with array values.
3--CREDITS--
4Francesco Fullone ff@ideato.it
5#PHPTestFest Cesena Italia on 2009-06-20
6--INI--
7session.use_cookies=0
8session.serialize_handler=php
9session.save_handler=files
10--FILE--
11<?php
12
13
14echo "*** Test substituting argument 1 with array values ***\n";
15
16
17
18$index_array = array(1, 2, 3);
19$assoc_array = array(1 => 'one', 2 => 'two');
20
21$variation_array = array(
22  'empty array' => array(),
23  'int indexed array' => $index_array,
24  'associative array' => $assoc_array,
25  'nested arrays' => array('foo', $index_array, $assoc_array),
26  );
27
28
29foreach ( $variation_array as $var ) {
30  var_dump(get_cfg_var( $var  ) );
31}
32?>
33--EXPECTF--
34*** Test substituting argument 1 with array values ***
35
36Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d
37NULL
38
39Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d
40NULL
41
42Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d
43NULL
44
45Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d
46NULL
47