1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 20:22:36 +02:00
Files
archived-php-src/ext/standard/tests/array/prev_error3.phpt
2020-06-24 13:13:44 +02:00

17 lines
298 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: Cannot pass parameter 1 by reference in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d