From 993e1866df547532a05ab6db76c9ff5aefc9a3df Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 25 Mar 2009 00:39:08 -0400 Subject: Imported Upstream version 5.2.6 --- ext/standard/tests/array/array_push_basic.phpt | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 ext/standard/tests/array/array_push_basic.phpt (limited to 'ext/standard/tests/array/array_push_basic.phpt') diff --git a/ext/standard/tests/array/array_push_basic.phpt b/ext/standard/tests/array/array_push_basic.phpt new file mode 100644 index 000000000..5ccf037da --- /dev/null +++ b/ext/standard/tests/array/array_push_basic.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test array_push() function : basic functionality +--FILE-- + 'un', 'two' => 'deux'); + +echo "\n-- Push values onto an associative array --\n"; +var_dump(array_push($array_assoc, $var1, $var2)); +var_dump($array_assoc); + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_push() : basic functionality *** + +-- Push values onto an indexed array -- +int(5) +array(5) { + [0]=> + string(4) "zero" + [1]=> + string(3) "one" + [2]=> + string(3) "two" + [3]=> + string(5) "three" + [4]=> + string(4) "four" +} + +-- Push values onto an associative array -- +int(4) +array(4) { + ["one"]=> + string(2) "un" + ["two"]=> + string(4) "deux" + [0]=> + string(5) "three" + [1]=> + string(4) "four" +} +Done \ No newline at end of file -- cgit v1.2.3