php-src/tests/lang/passByReference_012.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

22 lines
598 B
PHP

--TEST--
Test pass by reference semantics
--FILE--
<?php
// Simplified array_shift_variation5.phpt
// Showing warning:
// "Only variables should be passed by reference in %s on line %d"
$stack = array ( array ( 'two' ));
var_dump(array_shift(array_shift($stack)));
// This should show the identical warning
$original = array ( array ( 'one' ));
$stack = $original;
var_dump(array_shift(array_shift($stack)));
?>
--EXPECTF--
Notice: Only variables should be passed by reference in %s on line %d
string(3) "two"
Notice: Only variables should be passed by reference in %s on line %d
string(3) "one"