1--TEST--
2Implicit initialisation when passing by reference
3--FILE--
4<?php
5function passbyVal($val) {
6	echo "\nInside passbyVal call:\n";
7	var_dump($val);
8}
9
10function passbyRef(&$ref) {
11	echo "\nInside passbyRef call:\n";
12	var_dump($ref);
13}
14
15echo "\nPassing undefined by value\n";
16passbyVal($undef1[0]);
17echo "\nAfter call\n";
18var_dump($undef1);
19
20echo "\nPassing undefined by reference\n";
21passbyRef($undef2[0]);
22echo "\nAfter call\n";
23var_dump($undef2)
24?>
25--EXPECTF--
26
27Passing undefined by value
28
29Notice: Undefined variable: undef1 in %s on line 13
30
31Inside passbyVal call:
32NULL
33
34After call
35
36Notice: Undefined variable: undef1 in %s on line 15
37NULL
38
39Passing undefined by reference
40
41Inside passbyRef call:
42NULL
43
44After call
45array(1) {
46  [0]=>
47  NULL
48}
49