File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
array /
extract_variation7.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:03 2012 UTC (12 years, 4 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--
Test extract() function (variation 7)
--FILE--
<?php
/* EXTR_PREFIX_ALL called twice with same prefix string */
echo "\n*** Testing for EXTR_PREFIX_ALL called twice with same prefix string ***\n";
$a = array( "1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five" );
var_dump ( extract($a, EXTR_PREFIX_ALL, "same"));
$b = array( "f" => "fff", "1" => "one", 4 => 6, "" => "blank", 2.4 => "float", "F" => "FFF",
"blank" => "", 3.7 => 3.7, 5.4 => 7, 6 => 8.6, '5' => "Five", "4name" => "jonny", "a" => NULL, NULL => 3 );
var_dump ( extract($b, EXTR_PREFIX_ALL, "same"));
var_dump ( extract($b, EXTR_PREFIX_ALL, "diff"));
echo "Done\n";
?>
--EXPECTF--
*** Testing for EXTR_PREFIX_ALL called twice with same prefix string ***
int(5)
int(11)
int(11)
Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>