Jump to content

What's the best PHP editor?


fubowl

Recommended Posts

Text editor (windows): Notepad++

Text editor (linux): Kate

 

IDE: Eclipse

 

I also hear that there is a decent free editor just released from ActiveState: http://www.activestate.com/Products/komodo_edit/

 

I've not personally used this one though. There is a bit of a learning curve but having banged out code in text editors for a lot of years... finding a nice IDE is the only way to go IMO.

 

Link to comment
Share on other sites

@SH:  here you go- my million step guide to learning and using php.

 

1- download php

2- download apache

3- install apache

4- apache install doesn't seem to work.  install again.

5- install one more time.

912- apache worked, install php.

12412- realize that this doesn't really work on windows (and is frustrating to do so), go to Linux

12413- apache, php, and mysql is up and running

12414- learn php.

1000000- code a cms system.

Link to comment
Share on other sites

Dont Be So Mean, After You Build That Spaceship And Install PHP & MySQL You Should Be Able To Start Off Scripting

 

1. echo function: This Function Allows You To Post information And To Display Variable Results! But We'll Go Into

 

Variables Later. Simply Type

<?php echo ('Hello World'); ?>

...The <?php and the ?> Tags are used to tell the browser that this part of the script is going to be using php.

 

The echo tag is used to tell the browser it is about to display data (you can also use the print tag instead of

 

echo they both do the same thing is just a matter of prefrence!) Next the (' Tags tell the browser you are about to

 

display text which in this case is "Hello World" (Once again you can use ' or " tags to start and end echo

 

statement it is just a matter of prefrence.) And Finally the '); tag tells the browser to stop reading the data and

 

to display the results. The Result should just be an arial text in size 12pt font saying "Hello World"

 

2. Comments: Use these to display information about your code this information will not be displayed by the browser

 

you can use tags such as

<?php
// This Is A Comment But It only Works one One Line Of Code!
/*
This Is A Comment
It Is Good For Multiple Lines
Of Code Best For Complicated 
programming
*/
?>

 

3. Variables: Variables are for showing a series of code without contantly rewriting it. Variables are good if you

 

are going to display the same line of text over and over of if the variable changes such as by changing a page

 

could change the variable text.

<?php
$test1 = 5;
echo ($test1);
// Is Equivalent To...
echo ('5');
?>

notice in the echo I did not put colons (' or ") Because we are displaying a variable not text.

 

4. Comparason Rules: Comparason see if 2 variables or one variable text is the same, is not the same, less than,

 

greater than, contains a value, or does not contain a value!

<?php
// Lets say that variable j is equivalent to 10 so we write
$j = 10;
//Now We See If j equals 10
if ($j == 10){
  echo ('yes');
}
else { echo ('no'); }
//Now Lets See If Variable j equals 11
if ($j == 11){
  echo ('yes');
}
else { echo ('no'); }
//Lets see if variable j equals itself
if ($j === $j){
  echo ('yes');
}
else { echo ('no'); }
// Thats egnouph for Comparason
?>

 

5. if, elseif, and else Functions: These functions as seen above are very straight forward you can see how thier

 

done in the previous example but if you dont get it I will show again

<?php
$jack = 'jack';
if ($jack == jack){
  echo ('Your Name Is Jack');
}
elseif ($jack == 'mary'){
  echo ('your name is mary');
}
elseif ($jack == 'bob'){
  echo ('your name is bob');
}
else { echo ('Your Name Is' . $jack); }
?>

What this script did is check the variable jack and see if its value is jack and because it is it displays your

 

name is jack. But if you change the variable jack to mary it will say your name is mary! And so on through all the

 

elseif statements and if all the elseif statements are false as in the variable does not display any of them it

 

will jump to the else clause which will display the approaprate name for the variable such as billy, or joe, or

 

johnny.

 

6. I Am Tired Of Scripting I Am Going To Get A Coffee And I Will be Back!

 

7. Need More Help Scripting Please contact me at IVA_350@intva.com or if you have AIM I would be happy to help you through there my AIM is n350catyc and anyone can contact me for information it doesnt only have to be SH but I am always happy to share my wisdome (Which is not that much I started writing php about 2 months ago) I know alot more than what I posted here tonight but it is hard to explain what they write 1500 page books on in 7 categorys but feel free to contact and good luck! Welcome into the scripting family you are now umong millions!

 

<?php
/*
Welcome SH Php is your friend when you want it to be! Dont trry to cram information into your head but let it soak in though PHP 
Freaks and books and online tutorials! The best way I found to learning php is to read the book "SAMS Teach yourself PHP, Mysql And 
Apache all in one" just so you know I am in no way affiliated with that book I am just promoting it because it helpedme in a lot of ways 
that I am sure will help you as well! The World needs more programmers but at least now there is one more
*/
?>

 

***This entire post was written by N350CA You may use it in other posts as long as if this text remains at the bottom!

Link to comment
Share on other sites

On Windows I use Crimson Editor.

http://www.crimsoneditor.com/

It supports lots of languages and auto detects language.

It does alot of handy little things like help track opening and closing parentheses and braces, and auto indents for conditionals.

I havn't used very many editors, but after using Crimson, I feel no need to try any other.

 

On Mac, I have yet to find a free editor I really like. I currently use Taco HTML edit (which supports HTML and PHP only). But I can't say it's all that great.

Link to comment
Share on other sites

@SH:  here you go- my million step guide to learning and using php.

 

1- download php

2- download apache

3- install apache

4- apache install doesn't seem to work.  install again.

5- install one more time.

912- apache worked, install php.

12412- realize that this doesn't really work on windows (and is frustrating to do so), go to Linux

12413- apache, php, and mysql is up and running

12414- learn php.

1000000- code a cms system.

 

Why not just install xampp? Works out of the box with windows and save yourself the the hair pulling.

Link to comment
Share on other sites

With all of the people mentioning Eclipse, you should be aware that there are two different plugins for PHP on Eclipse.

 

1. PHPEclipse - The original PHP eclipse plugin.

2. PDT - Started by Zend. Starting to get mature.

 

I use PHPEclipse myself. I like seeing a preview of what I'm coding without alt-tabing. The code hinting on PDT has come a long way though, and it seems like it's being more actively developed than PHPEclipse.

 

Just for editing a file, I use Notepad++. Simple, light, code highlighting, macros, and they just started adding basic code hinting.

Link to comment
Share on other sites

I agree, xampp is a lot easier to install if you're just wanting it for test purposes. I've spent hours buggering around with manual installs of apache/php/mysql in the past, and it's a huge waste of time when all you want to do is test your scripts, get xampp!

 

Plus it means that million step guide to learning php is more like 10 (where ten is get out of this forum and read up on it)!

Link to comment
Share on other sites

Yeah... depends on what you're doing with it, but there are all sorts of utilities like this. Another for example is wamp. These are not good for any type of production environment though and are typically running wide open.

Link to comment
Share on other sites

@SH:  here you go- my million step guide to learning and using php.

 

1- download php

2- download apache

3- install apache

4- apache install doesn't seem to work.  install again.

5- install one more time.

912- apache worked, install php.

12412- realize that this doesn't really work on windows (and is frustrating to do so), go to Linux

12413- apache, php, and mysql is up and running

12414- learn php.

1000000- code a cms system.

 

Why not just install xampp? Works out of the box with windows and save yourself the the hair pulling.

 

i didnt learn that until too late )=.  oh well, php has been running for about 6 years for me, so nothing too bad came out of it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.