Code sidebar does not show PHP functions when the function keyword begins with a capital F

When using Komodo IDE 8.5.3 to edit a PHP file, if the keyword “function” begins with a captial F, the function does not appear in the Code sidebar.

I can change the capital F to a lowercase f, save the file, and then the function appears in the Code sidebar.

I’ve done PHP development for over 10 years and have never seen nor used any code that used capitals for the letter F in function definitions, I’m surprised PHP even “allows” it. I’d advice against typing your code that way as it’s very unconventional to PHP.

That said, you could give the New Source Tree extension a try and see if that works better for you. If PHP does indeed support capitalized function keywords then we ought to support it, but I don’t see it being a priority given the fact that it’s very unconventional.

FYI, the same happens when you use e.g. Class instead of class. I actually found a case in the wild not long ago (the most horrible mysql wrapper you could imagine, chosen by the original developer of a project I sadly inherited).

While it may not be best practice, it is definitely valid PHP code. In PHP, keywords, class names, function names, and namespaces are case insensitive. I have been using a competitor’s product for 5 years and it has had no problems supporting this.

Thanks guys, I’ve opened a bug for this issue. If it’s a simple fix we should be able to push this out in a nightly build.