Annotation of embedaddon/php/ext/spl/tests/arrayObject_asort_basic1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: Test ArrayObject::asort() function : basic functionality with array based store
3: --FILE--
4: <?php
5: /* Prototype : int ArrayObject::asort()
6: * Description: proto int ArrayIterator::asort()
7: * Sort the entries by values.
8: * Source code: ext/spl/spl_array.c
9: * Alias to functions:
10: */
11:
12: echo "*** Testing ArrayObject::asort() : basic functionality ***\n";
13:
14: $ao1 = new ArrayObject(array(4,2,3));
15: $ao2 = new ArrayObject(array('a'=>4,'b'=>2,'c'=>3));
16: var_dump($ao1->asort());
17: var_dump($ao1);
18: var_dump($ao2->asort('blah'));
19: var_dump($ao2);
20: ?>
21: ===DONE===
22: --EXPECTF--
23: *** Testing ArrayObject::asort() : basic functionality ***
24: bool(true)
25: object(ArrayObject)#1 (1) {
26: ["storage":"ArrayObject":private]=>
27: array(3) {
28: [1]=>
29: int(2)
30: [2]=>
31: int(3)
32: [0]=>
33: int(4)
34: }
35: }
36: bool(true)
37: object(ArrayObject)#2 (1) {
38: ["storage":"ArrayObject":private]=>
39: array(3) {
40: ["b"]=>
41: int(2)
42: ["c"]=>
43: int(3)
44: ["a"]=>
45: int(4)
46: }
47: }
48: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>