summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/prev_error3.phpt
blob: 6f0beaf11539be909529241481c9fa9887be41b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
prev - ensure we cannot pass a temporary
--FILE--
<?php
/* Prototype  : mixed prev(array $array_arg)
 * Description: Move array argument's internal pointer to the previous element and return it
 * Source code: ext/standard/array.c
 */

/*
 * Pass temporary variables to prev() to test behaviour
 */


var_dump(prev(array(1, 2)));
?>
--EXPECTF--
Fatal error: Only variables can be passed by reference in %s on line %d