php-src/ext/standard/tests/array/prev_error3.phpt
Nikita Popov 25f1c405ff Update ext/standard parameter names
Closes GH-6214.
2020-09-29 16:49:46 +02:00

16 lines
320 B
PHP

--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