1

Every time i use the autocomplete with intelephense for my functions, they are prefixed with "global" and its annoying to changed it every time. For example i declared this function in mi file:

function countDigit($n) {
$count = 0;
while ($n != 0)
{
    $n = round($n / 10);
    ++$count;
}
return $count;
}

Now when i try to use this function and i start writing countD and press enter or tab, it autocompletes to GlobalCountDigit(). I dont know what to do to stop that from happening. Someone can please help me and thell me why this happen?, im a beginner. Sorry for my bad English.

  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 05 '22 at 21:11
  • Try updating vscode. I had this same problem not long ago. There were a couple recent updates this past month. Seemed to fix itself, as it went away with no help from myself. – MisterG13 Jun 06 '22 at 00:37
  • Same here. @MisterG13 this is the issue: https://user-images.githubusercontent.com/238439/185887725-cd46ac06-436c-40ec-a0ca-c06baf4e24a4.mp4 – ffflabs Aug 22 '22 at 09:25

1 Answers1

2

I don't know what it is but it worked for me. If u are using PHP intelephense, disable the "Insert Use Declaration".

enter image description here

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32775573) – TarangP Sep 28 '22 at 09:11