File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
array /
bug31213.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, 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--
Bug #31213 (Sideeffects caused by bug #29493)
--FILE--
<?php
function test($use_extract) {
$a = 1;
$b = 1;
$arr = array(
'_a' => $a,
'_b' => &$b
);
var_dump($a, $b);
if ($use_extract) {
extract($arr, EXTR_REFS);
} else {
$_a = &$arr['_a'];
$_b = &$arr['_b'];
}
$_a++;
$_b++;
var_dump($a, $b, $_a, $_b, $arr);
}
test(false);
test(true);
?>
--EXPECT--
int(1)
int(1)
int(1)
int(2)
int(2)
int(2)
array(2) {
["_a"]=>
&int(2)
["_b"]=>
&int(2)
}
int(1)
int(1)
int(1)
int(2)
int(2)
int(2)
array(2) {
["_a"]=>
&int(2)
["_b"]=>
&int(2)
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>