notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

[BUG] PHP function list parser fails to detect functions declared with reference operator (&)

Open
#16,765 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Is there an existing issue for this?
  • I have searched the existing issues
Description of the Issue

The Function List panel in Notepad++ does not catch functions declared with a leading ampersand (&) required for functions that return by reference. They don't appear in the function list (but also don't break detection of functions further down the line).

The PHP function list parser should already support reference-returning functions, the regex includes an optional & via (?:\x26\s*)?. However, the function name capture does not seem to get resolved correctly.

Steps To Reproduce

Image

Current Behavior

Function list does not show reference-returning functions prefixed with &.

Expected Behavior

Function list should also show reference-returning functions prefixed with &.

Debug Information
Notepad++ v8.8.1   (64-bit)
Build time : May  3 2025 - 18:41:09
Scintilla/Lexilla included : 5.5.6/5.4.4
Boost Regex included : 1_85
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : OFF
Placeholders : OFF
Scintilla Rendering Mode : SC_TECHNOLOGY_DIRECTWRITE (1)
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only)
Dark Mode : ON
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.5965
Current ANSI codepage : 1252
Plugins : 
    mimeTools (3.1)
    NppConverter (4.6)
Anything else?

Edited after noticing I was (unwittingly) still on 8.6, a few months outdated. After updating to current 8.8.1 the issue remains.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the PHP function-list parser and the regular expression that handles reference-returning functions. Reproduce the missing entry with a PHP function prefixed by &, then verify that reference-returning functions appear in the Function List without changing detection of later functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, php
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.