1--TEST--
2prev - ensure warning is received when passing an indirect temporary.
3--FILE--
4<?php
5/*
6 * Pass temporary variables to prev() to test behaviour
7 */
8
9function f() {
10    $array  = array(1,2);
11    end($array);
12    return $array;
13}
14
15echo "\n-- Passing an indirect temporary variable --\n";
16var_dump(prev(f()));
17
18?>
19--EXPECTF--
20-- Passing an indirect temporary variable --
21
22Notice: Only variables should be passed by reference in %s on line %d
23int(1)
24