1--TEST--
2Test isset() function : basic functionality
3--FILE--
4<?php
5class foo {}
6
7echo "*** Testing isset() : basic functionality ***\n";
8
9$i = 10;
10$f = 10.5;
11$s = "Hello";
12$b = true;
13$n = NULL;
14
15echo "Test multiple scalar variables in a group\n";
16var_dump(isset($i, $f, $s, $b));
17var_dump(isset($i, $f, $s, $b, $n));
18
19echo "Unset a few\n";
20unset($i, $b);
21
22echo "Test again\n";
23var_dump(isset($i, $f, $s, $b));
24
25echo "\n\nArray test:\n";
26$arr = array();
27var_dump(isset($var));
28var_dump(isset($var[1]));
29var_dump(isset($var, $var[1]));
30echo "..now set\n";
31$var[1] = 10;
32var_dump(isset($var));
33var_dump(isset($var[1]));
34var_dump(isset($var, $var[1]));
35
36?>
37--EXPECT--
38*** Testing isset() : basic functionality ***
39Test multiple scalar variables in a group
40bool(true)
41bool(false)
42Unset a few
43Test again
44bool(false)
45
46
47Array test:
48bool(false)
49bool(false)
50bool(false)
51..now set
52bool(true)
53bool(true)
54bool(true)
55