File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
lang /
passByReference_012.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 4 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Test pass by reference semantics
3: --FILE--
4: <?php
5: error_reporting(E_ALL | E_STRICT | E_NOTICE);
6:
7: // Simplified array_shift_variation5.phpt
8: // Showing warning:
9: // "Only variables should be passed by reference in %s on line %d"
10: $stack = array ( array ( 'two' ));
11: var_dump(array_shift(array_shift($stack)));
12:
13: // This should show the identical warning
14: $original = array ( array ( 'one' ));
15: $stack = $original;
16: var_dump(array_shift(array_shift($stack)));
17: ?>
18: ===DONE===
19: --EXPECTF--
20: Strict Standards: Only variables should be passed by reference in %s on line %d
21: string(3) "two"
22:
23: Strict Standards: Only variables should be passed by reference in %s on line %d
24: string(3) "one"
25: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>