NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHP 5 Classes and code-completion in .php files


Joined: 25 Sep 2006
Posts: 5
Reply with quote
Hi,

I am new to phped. I made a sample class to see if it would show me user defined methods and properties but it doesn't work in php files.

If i input the same class into a .php5 file it does code complete. Also, the keywords private and public get underlined red and say they are a syntax error in .php files.

Obvious the code completion in .php files is for php 4. Is there any way to make code complete work in php 5 files using the new class definitions?

I have never even heard of .php5 files, why would you uses them or are they just for phped?

One last question, i read somewhere that phped closes html tags automatically but this does not happen. If I type <di I get a div in the code comple but when i select it it just finishes off the word div but doesn't add a > or a </div> is there any way to enable this?

Thanks for any help Smile
View user's profileFind all posts by onemindSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
During its installation, PhpED asked you if you want PHP v4 or PHP v5 to be used by default for PHP files. You probably left it PHP v4.
Now you can change it by a) removing .php and .inc from the list for PHP4 association (see Tools->Settings->File Associations) and b) adding .php and .inc for PHP5.

Quote:
i read somewhere that phped closes html tags automatically but this does not happen

You may press Ctrl+Shift+C to do it manually or set "Auto close" in the Tag properties (see Tools->Settings->Reserved Words, HTML Language, auto-close column)
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 25 Sep 2006
Posts: 5
Reply with quote
Excellent Smile

Thank you very much.

One last question, do i have to manually select autoclose on the whole list of tags or is there a way to set auto close to on for all tags?

Thanks again Smile
View user's profileFind all posts by onemindSend private message


Joined: 25 Sep 2006
Posts: 5
Reply with quote
Its all good, i just did it by hand.
View user's profileFind all posts by onemindSend private message
PHP 5 Classes and code-completion in .php files
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