NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Codecompletion and PHP5
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
I know I could just try this but I am not near my PC with PHPed right now.

I am thinking about switching from php4 to php5, mainly because of the OOP.

If I delcare a function for private in php5, will it still show up in the code completion list when it is out of scope ?

An example

Code:
class someclass
{
    private function world()
    {
          return " world";
     }

    public function helloWorld()
    {
          echo "Hello" . $this->world();
     }
}

$myClass = new someclass();

When I now write $myClass->

Will the lookup window now display both functions (world and helloWorld) or will only the function available to me (the public helloWorld be displayed. Since I am out of scope from the class only the public functions should be displayed.

In PHP4, there was no such access declarations, but they exists in PHP5, so is PHPed clever enough to understand them ?
View user's profileFind all posts by hgrSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
I think the picture might be worth a thousand words, so I attached two images Smile




View user's profileFind all posts by yfaktorSend private message
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
GREAT!
View user's profileFind all posts by hgrSend private message
[resolved] Codecompletion and PHP5
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic