php-src/Zend/tests/bug33257.phpt
Nikita Popov 8d00385871 Reclassify E_STRICT notices
Per RFC https://wiki.php.net/rfc/reclassify_e_strict

While reviewing this, found that there are still three E_STRICTs
left in libraries - need to discuss those.
2015-04-01 11:17:55 +02:00

26 lines
483 B
PHP

--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
)