Page 1 of 1

strength/disadvantages of php over j2ee and .net ????

Posted: Mon Mar 13, 2006 1:16 am
by josh4php
hi
i m mahesh from india, new to php, and just want to know strength/disadvantages of php over j2ee and .net.
if any one can explain me ???? :? :?

Posted: Tue Mar 14, 2006 3:32 pm
by alvinphp
With PHP you can break almost ever rule of good coding and somehow your site still works. I think of it as the Unix/Linux version of the old ASP, but better.

Posted: Tue Mar 14, 2006 4:27 pm
by josh
One of the advantages is the variable types, in terms of development time having PHP "guess" what type you want and auto-cast your variables helps out. You can also have strings as array keys and arrays can hold any type of variable (you can mix strings, integers, and object references all in one array for example). This may be seen as a disadvantage.

Example of PHP variable usage:

Code: Select all

$a  = 1;
$a .= ' 2 3';
var_dump($a); // '1 2 3'

ex2.

Code: Select all

$a = "1";
$a++; // 2

Posted: Tue Mar 14, 2006 5:01 pm
by alvinphp
jshpro2 wrote:One of the advantages is the variable types, in terms of development time having PHP "guess" what type you want and auto-cast your variables helps out.
A perfect example of what I consider bad coding practice (not being explicit with your data types), but it does make coding easier. In the long run though I believe it causes more problems then benefits.