mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
19 lines
427 B
Plaintext
19 lines
427 B
Plaintext
|
--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
|