Tools for PHP developers

August 31st, 2009 by HTML-Kit Support            Views: 22179
VN:F [1.7.3_972]
Rating: 4.0/5 (7 votes cast)
 

Do you use PHP in your web development? Here are some quick tips on how to get the most out of HTML-Kit Tools.

Starting a block

Before you can do anything in PHP, you have to start a code block. Press < and pause for a fraction of a second. When the TagsReminder pops up press ? followed by Enter.

Don’t call me foo

If you can’t remember the exact names of over 1000 functions in PHP, you’re not alone. Press Ctrl+Space and start typing the function name or scroll through the list of available names. For example, press Ctrl+Space and type mysql for a list of MySQL related functions.

Dropping function names

For a drop-down menu-based list of PHP functions, check out PHP function categories. There’s a plugin for virtually every category so you can pick and choose the categories you plan to use, instead of installing the whole shebang.

Go to the source

When it’s time to read the manual it’s easy to go to the source in HTML-Kit Tools. Place the caret on a function name and press F1. If this is the first time you’ve opened this dialog, click "PHP." The next time you press F1 you can simply cancel it with Esc to go back to the same PHP reference. php_referenz makes it easier to directly go to the PHP function definition. Of course, php.net isn’t the only available reference. It’s just as easy to look up a function in search engines as well.

Missed and found

Finding the matching brace — { ( [ ] ) } — is as simple as placing the caret on one half of them. If there’s a match, it’ll be highlighted. And Ctrl+M will take you to the matching brace. If there’s no match, it’ll be highlighted in red.

Lipstick on code

Making the code pretty is not just about aesthetics. Well-structured code is easier to follow which in turn helps with spotting possible errors. hkPHPBeautifyHelper is one of the plugins that can help style your PHP code.

Look at it through a web server

If you’re running a PHP-enabled local web server for testing PHP scripts, select "View > Preview > Server-side script" from the main menu to preview through localhost. Actually, you can specify local and remote addresses.

Call the interpreter

No local web server? Do you have a local installation of PHP? "View > Preview > Preview through PHP interpreter" can do just that. If nothing happens, make sure that php.exe is in the PATH and reopen HTML-Kit Tools.

Keep your snippets closer

As you code in PHP you’ll no doubt end up with many snippets that you use over and over. Keep them safe and easily accessible using HTML-Kit Tools snippet window. Click the Snippets icon on the Actions Bar or select "File > Insert > Snippet window" from the main menu to start. To add a snippet, select the code to be added and press Ctrl+Shift+T. If you like the keyboard more than the mouse, Ctrl+Shift+I brings up the snippet window (press the first letter to jump to an item).

Jump to the mark

There are times you’ll have to jump around a file. Press Ctrl+F2 to quickly create bookmarks that you can revisit by pressing F2 / Shift+F2.

What’s the difference?

Someone sent you a newer version of a script? Use "Tools > Extra > Compare documents (diff)" to compare the differences between your version and the newer version.

Fold it away

When working with large PHP scripts you may want to fold away code blocks that you’re not editing at the moment. Explore the "Edit > Code Folding" menu for functions that can help you with this.

Double vision

Sometimes you want to hide code with code folding but other times you want to see the same code twice. Well, different parts of the same document to be precise. "View > Window > Duplicate document view" displays a second copy of the current document so you can refer to one part of it while editing another, without having to scroll.

Look both sides before you replace

With HTML-Kit Tools’s Replace dialog (Ctrl+H) you can view before and after results and then decide whether you want to apply the changes. Searches can be single-line plain text to multi-line regular expressions.

Addicted to MySQL

If MySQL is your preferred PHP database, have a look at the bsPHPMySQL plugin. There’s also a plugin for PostgreSQL.

Shorthand for faster coding

HTML-Kit Shorthand is one of the must see new features in {hkt_titles}. ksphpshorthand_ctrlstructures is then one of the must see Shorthand plugins. After plugin installation, type "switch" without quotes and press Ctrl+J for an example.

Oops I did it again!

Made a boo boo? HTML-Kit Tools has built-in and easy to use file versioning. To go back to a previous version of a PHP script (or other type of file for that matter), open the file in question and select "File > Restore > Previous version" from the main menu for a list of previously saved versions. Click "Open" to open a copy with the date stamp.

Finding things, incrementally

Searching for code fragments can prove more difficult than searching for plain text. Use incremental search (Ctrl+F) to find a few characters at a time. You can always press Esc to go back to the previous line if you change your mind.

Code Navigator

For a list of PHP variables and function names, keep the Code Navigator window open ("View > Document Information > Code Navigator").

Remember the comments

Good comments lead to better coding. So they say! View your TODOs, FIXMEs and NOTEs in a central location using "View > Document Information > Code Comments."

Want new colors?

Don’t like the colors in the default colorizer? Try a different colorizer style.

Start a project

Some of HTML-Kit Tools’s features related to organizing files, uploading and online editing are only available through a project window (improved version of Workspace window if you’re coming from HTML-Kit 292). Select "File > Projects" for commands related to managing projects.

Do it your way

If all this isn’t enough you can even write custom plugins in PHP.

That’s not all folks!

There are other HTML-Kit Tools commands and features not specific to PHP that you may still find useful when working with PHP. Don’t forget to take a moment to explore menu items, including the ones on right click menus.

Post questions or share tips on the support forum.

Was this article helpful?
This did not answer my questionThis answered my question (+6 rating, 8 votes)
Loading ... Loading ...
Share this on:
  • Twitter
  • Digg
  • StumbleUpon
  • Facebook
  • MySpace
  • del.icio.us
  • Sphinn
  • LinkedIn
  • Google Bookmarks
  • Live
  • Yahoo! Buzz
  • email
  • Print
 

17 Responses to “Tools for PHP developers”

  1. CBloss says:

    I’ve been doing a TON of debugging for a friend and reading this article really helped out. I didn’t know there were so many options for PHP developers! Thank you for informing us of some helpful tips!

  2. danny says:

    selma@lien.kirk” rel=”nofollow”>.…

    спасибо за инфу….

  3. Kirk says:

    scopes@invitational.dares” rel=”nofollow”>.…

    thank you!…

  4. isaac says:

    teter@revery.worthy” rel=”nofollow”>.…

    ñïñ….

  5. Francisco says:

    lasalle@lathered.vern” rel=”nofollow”>.…

    good info!…

  6. tyrone says:

    striving@creature.untch” rel=”nofollow”>.…

    áëàãîäàðþ!!…

  7. lance says:

    portrays@enchained.industralization” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!…

  8. darrell says:

    buenas@baptized.dilthey” rel=”nofollow”>.…

    ñïñ….

  9. Edwin says:

    batch@depart.burman” rel=”nofollow”>.…

    hello!…

  10. jackie says:

    bethel@plowing.solemnly” rel=”nofollow”>.…

    ñïñ….

  11. Joe says:

    unventilated@thyroglobulin.demandingly” rel=”nofollow”>.…

    thank you!!…

  12. Scott says:

    tighten@beggar.businesses” rel=”nofollow”>.…

    áëàãîäàðåí!!…

  13. Eric says:

    johann@cribs.tappet” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  14. Rex says:

    recalculation@mottled.sophisticated” rel=”nofollow”>.…

    thank you….

  15. Leo says:

    enmity@fresh.witch” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  16. Everett says:

    alexandria@cranston.follows” rel=”nofollow”>.…

    ñïñ!…

  17. daniel says:

    sponsored@tendon.niccolo” rel=”nofollow”>.…

    thanks for information!…

Do you have a question that requires a reply? Please post it here for a timely and friendly reply.
 
If you have a comment, you can post it below. Not all comments are read, so be sure to use the support forum instead if you need an answer.
 
Leave a Comment or use the support forum if you have a question.

 

© 2009 HTML-Kit.com. All Rights Reserved.  |  Privacy Statement   
HTML design aid