vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

__halt_compiler breaks autocompletion

Open TimWolla opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug

When using __halt_compiler(); + some non-PHP blob after that, the autocompletion of e.g. function names breaks for the whole file.

To Reproduce

<?php

$fp = fopen(__FILE__, 'r');
fseek($fp, __COMPILER_HALT_OFFSET__);
$json = stream_get_contents($fp);
fclose($fp);

echo $json;

exit;
__halt_compiler();
{"foo":"bar"}

Expected behavior

I expected autocompletion to continue to work.

Screenshots

Broken:

scrot_2022_08_11_13_49_38

Working:

image

Platform and version

Version: 1.70.0
Commit: da76f93349a72022ca4670c1b84860304616aaa2
Date: 2022-08-04T04:38:48.541Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Linux x64 5.4.0-123-generic

with Intelephense v1.8.2.

TimWolla avatar Aug 11 '22 11:08 TimWolla

This might be related to: #1636

TimWolla avatar Aug 11 '22 11:08 TimWolla