1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00
Files
archived-php-src/tests/lang/passByReference_012.phpt
Nikita Popov 1a3bdb4a2c Remove some references to E_STRICT in tests
run-tests.php enforces error_reporting=E_ALL (including E_STRICT),
setting this explicitly in not necessary. Conversely, after the
removal of some E_STRICT errors, explicitly excluding it is no
longer necessary in some places.
2018-02-03 18:17:12 +01:00

24 lines
621 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)));
?>
===DONE===
--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"
===DONE===