bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code

Home Page:https://intelephense.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected P1010 Undefined function error for oci_set_prefetch_lob

mattjson opened this issue · comments

Describe the bug

When I use PHP 8.2, I can call oci_set_prefetch_lob, but Intelphense reports the following error: P1010 Undefined function

To Reproduce

  1. Open VS Code
  2. Set Intelephense PHP version to 8.2
  3. Save the following code snippet as a file

Example from: https://www.php.net/manual/en/function.oci-set-prefetch-lob.php

<?php

$conn = oci_connect('hr', 'welcome', 'localhost/XE');

$stid = oci_parse($conn, 'SELECT myclob FROM mytable');
oci_set_prefetch_lob($stid, 100000);  // Set before calling oci_execute()
oci_execute($stid);

echo "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS)) {
    echo "<tr>\n";
    foreach ($row as $item) {
        echo "    <td>".($item !== null ? htmlentities($item, ENT_QUOTES) : "&nbsp;")."</td>\n";
    }
    echo "</tr>\n";
}
echo "</table>\n";

oci_free_statement($stid);
oci_close($conn);

?>

Expected behavior

VS Code shows no error

Screenshots

image

Platform and version

Windows
PHP Intelephense
v1.10.4