Well if you're looking for a quicklist:
- Loop Constructs are identical (including foreach)
- Selection is identical (if / else / switch etc)
- String Handling is similar:
Code:
//Java Init
String mystring = "foo";
// Java Append
mystring = mystring + "bar";
// PHP Init
$mystring = "foo";
// PHP Append
$mystring = $mystring . "bar";
The main differences come with the Object Oriented side of things. You're constantly reminded of the fact you're programming in a OO language with Java. In PHP you have to be really careful how you structure your code, but it is very possible to get a OO feel to it (in particularly with PHP5).
Another thing to bear in mind is that PHP is "loosly" typed. For example:
Code:
$myinteger = 1 + 3;
echo ($myinteger); // will output 4;
$mystring = "1" . "3";
echo ($mystring); // will output 13
So you don't need to use a datatype when initialising a variable in PHP.
Hope that helps.
- Kar