I have a file named config.php, and i have other files includes config.php. When editing one of files, I use an object from config.php and it autocompletes name of the object. B
From netbeans go to tools->options
Go to editor selection and from code Completion select php for languages section. This will expand menu and you will see a section Code Completion for Class Methods
Set that configuration by selecting checkboxes on that section.
I hope I understood this right. I use netbeans too and I am able auto-complete after I change my netbeans settings.