2005-06-22 08:33:00 +00:00
|
|
|
--TEST--
|
2007-05-07 17:54:12 +00:00
|
|
|
Bug #33257 (array_splice() inconsistent when passed function instead of variable)
|
2005-10-19 12:48:24 +00:00
|
|
|
--INI--
|
|
|
|
error_reporting=4095
|
2005-06-22 08:33:00 +00:00
|
|
|
--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--
|
2005-09-19 16:02:21 +00:00
|
|
|
Strict Standards: Only variables should be passed by reference in %sbug33257.php on line 10
|
|
|
|
Array
|
|
|
|
(
|
|
|
|
[0] => a
|
|
|
|
[1] => b
|
|
|
|
[2] => c
|
|
|
|
)
|