mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
19 lines
427 B
PHP
Executable File
19 lines
427 B
PHP
Executable File
--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
|