File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
spl /
tests /
arrayObject_asort_basic2.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
SPL: Test ArrayObject::asort() function : basic functionality with object based store
--FILE--
<?php
/* Prototype : int ArrayObject::asort()
* Description: proto int ArrayIterator::asort()
* Sort the entries by values.
* Source code: ext/spl/spl_array.c
* Alias to functions:
*/
echo "*** Testing ArrayObject::asort() : basic functionality ***\n";
Class C {
public $prop1 = 'x';
public $prop2 = 'z';
private $prop3 = 'a';
public $prop4 = 'x';
}
$c = new C;
$ao1 = new ArrayObject($c);
var_dump($ao1->asort());
var_dump($ao1, $c);
?>
===DONE===
--EXPECTF--
*** Testing ArrayObject::asort() : basic functionality ***
bool(true)
object(ArrayObject)#2 (1) {
["storage":"ArrayObject":private]=>
object(C)#1 (4) {
["prop3":"C":private]=>
string(1) "a"
["prop1"]=>
string(1) "x"
["prop4"]=>
string(1) "x"
["prop2"]=>
string(1) "z"
}
}
object(C)#1 (4) {
["prop3":"C":private]=>
string(1) "a"
["prop1"]=>
string(1) "x"
["prop4"]=>
string(1) "x"
["prop2"]=>
string(1) "z"
}
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>