mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Remove bogus test: see bug #20993
This commit is contained in:
parent
3e1f3b2124
commit
a79c7c7c84
1 changed files with 0 additions and 60 deletions
|
@ -1,60 +0,0 @@
|
||||||
--TEST--
|
|
||||||
Bug #27395 (reference to an array index makes the array to be passed by reference always)
|
|
||||||
--FILE--
|
|
||||||
<?php
|
|
||||||
|
|
||||||
function theFunction($arg) {
|
|
||||||
$arg[0] = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reference on array index
|
|
||||||
$arr1 = array (1);
|
|
||||||
$reference1 =& $arr1[0];
|
|
||||||
|
|
||||||
var_dump($reference1);
|
|
||||||
var_dump($arr1);
|
|
||||||
theFunction($arr1);
|
|
||||||
var_dump($reference1);
|
|
||||||
var_dump($arr1);
|
|
||||||
|
|
||||||
echo "--------\n";
|
|
||||||
|
|
||||||
// Reference on array
|
|
||||||
$arr2 = array (1);
|
|
||||||
$reference2 =& $arr2;
|
|
||||||
|
|
||||||
var_dump($reference2);
|
|
||||||
var_dump($arr2);
|
|
||||||
theFunction($arr2);
|
|
||||||
var_dump($reference2);
|
|
||||||
var_dump($arr2);
|
|
||||||
|
|
||||||
?>
|
|
||||||
--EXPECT--
|
|
||||||
int(1)
|
|
||||||
array(1) {
|
|
||||||
[0]=>
|
|
||||||
&int(1)
|
|
||||||
}
|
|
||||||
int(1)
|
|
||||||
array(1) {
|
|
||||||
[0]=>
|
|
||||||
&int(1)
|
|
||||||
}
|
|
||||||
--------
|
|
||||||
array(1) {
|
|
||||||
[0]=>
|
|
||||||
int(1)
|
|
||||||
}
|
|
||||||
array(1) {
|
|
||||||
[0]=>
|
|
||||||
int(1)
|
|
||||||
}
|
|
||||||
array(1) {
|
|
||||||
[0]=>
|
|
||||||
int(1)
|
|
||||||
}
|
|
||||||
array(1) {
|
|
||||||
[0]=>
|
|
||||||
int(1)
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue