blob: c7bfe55e235021ed6a52b8eb32efc8df6fba8c74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--TEST--
Bug #33257 (array_splice() inconsistent when passed function instead of variable)
--INI--
error_reporting=4095
--FILE--
<?php
class X {
protected static $arr = array("a", "b", "c");
public static function getArr() {
return self::$arr;
}
}
//$arr1 = X::getArr();
array_splice(X::getArr(), 1, 1);
print_r(X::getArr());
?>
--EXPECTF--
Notice: Only variables should be passed by reference in %sbug33257.php on line 10
Array
(
[0] => a
[1] => b
[2] => c
)
|