vscode-intelephense
vscode-intelephense copied to clipboard
__halt_compiler breaks autocompletion
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:

Working:

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.
This might be related to: #1636