1--TEST--
2Bug #29038 (extract(), EXTR_PREFIX_SAME option prefixes empty strings)
3--FILE--
4<?php
5function f1() {
6  $c = extract(array("" => 1),EXTR_PREFIX_SAME,"prefix");
7  echo "Extracted:";
8  var_dump($c);
9  print_r(get_defined_vars());
10}
11function f2() {
12  $a = 1;
13  $c = extract(array("a" => 1),EXTR_PREFIX_SAME,"prefix");
14  echo "Extracted:";
15  var_dump($c);
16  print_r(get_defined_vars());
17}
18function f3() {
19  $a = 1;
20  $c = extract(array("a" => 1),EXTR_PREFIX_ALL,"prefix");
21  echo "Extracted:";
22  var_dump($c);
23  print_r(get_defined_vars());
24}
25function f4() {
26  $c = extract(array("" => 1),EXTR_PREFIX_ALL,"prefix");
27  echo "Extracted:";
28  var_dump($c);
29  print_r(get_defined_vars());
30}
31function f5() {
32  $c = extract(array("111" => 1),EXTR_PREFIX_ALL,"prefix");
33  echo "Extracted:";
34  var_dump($c);
35  print_r(get_defined_vars());
36}
37
38f1();
39f2();
40f3();
41f4();
42f5();
43?>
44--EXPECT--
45Extracted:int(0)
46Array
47(
48    [c] => 0
49)
50Extracted:int(1)
51Array
52(
53    [a] => 1
54    [prefix_a] => 1
55    [c] => 1
56)
57Extracted:int(1)
58Array
59(
60    [a] => 1
61    [prefix_a] => 1
62    [c] => 1
63)
64Extracted:int(0)
65Array
66(
67    [c] => 0
68)
69Extracted:int(1)
70Array
71(
72    [prefix_111] => 1
73    [c] => 1
74)
75