summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/prev_error3.phpt
blob: f7444975946cc0f140d9348e6708a41c1c5c41b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
prev - ensure we cannot pass a temporary
--FILE--
<?php
/*
 * Pass temporary variables to prev() to test behaviour
 */


var_dump(prev(array(1, 2)));
?>
--EXPECTF--
Fatal error: Uncaught Error: prev(): Argument #1 ($array) cannot be passed by reference in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d