summaryrefslogtreecommitdiff
path: root/tests/cpp/include/variables/021-HashMember-3.h
blob: f7c0914113cf8067c3896ba7f0d78878987fec57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
 *
 *  Test variables
 *	019-HashMember-3.phpt
 *	Test HashMember
 *
 */




/**
 *  Set up namespace
 */
namespace TestVariables {

	/**
	 *  This function returns complex array
	 */
	Php::Value test_HashMember_3()
	{
	    
	    Php::Value r, tmp(Php::Type::Array);
	    //Php::Value tmp;

		tmp.set("key2", "val1-2");
		r.set("key1", tmp);
		r.get("key1").set("key3", "val1-3");

		// expect to receive the same as when recording:
		//r["key1"]["key2"] = "val1-2";
	    //r["key1"]["key3"] = "val1-3";
	    
		return r;
	}

/**
 *  End of namespace
 */
}