summaryrefslogtreecommitdiff
path: root/Zend/tests/bug33257.phpt
blob: b3e98003a391608dc67aa56aa65e0713779d8df1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #33257 array_splice() inconsistent when passed function instead of variable 
--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--
Fatal error: Only variables can be passed by reference in %sbug33257.php on line 10