Mostly because of the things that Perl has and PHP doesn't. It's not that PHP is "evil". That trap is so easy to fall into. But:
- No map - I hate all the variations on sort - (proper) closures - a lack of a central code repo (PEAR and PECL not withstanding) - a lack of "best practices" - not a big testing culture (though there is movement in this) - wheel reinvention; this goes with the lack of a central code repo (everyone redoes everythign) - the use of one data type for both indexed and associative data structures
That being said, for most PHP apps, deployment is dead simple.
I dislike php because you can do the following is incredibly hard to debug, and the interpreter will silently go on without any warnings or errors:
$ZipCode = '90210';
... ... lots of code
print "the zip is: $ZIPCode\n";
In my opinion this is fundamentally broken, and I will have a hard time convincing myself to use php for any reason because of this. This is solved with one line in perl5:
use strict;
I was also surprised that ruby and python while they would fail on the above sudo code, they wouldn't fail on the following case:
Mostly because of the things that Perl has and PHP doesn't. It's not that PHP is "evil". That trap is so easy to fall into. But:
ResponderEliminar- No map
- I hate all the variations on sort
- (proper) closures
- a lack of a central code repo (PEAR and PECL not withstanding)
- a lack of "best practices"
- not a big testing culture (though there is movement in this)
- wheel reinvention; this goes with the lack of a central code repo (everyone redoes everythign)
- the use of one data type for both indexed and associative data structures
That being said, for most PHP apps, deployment is dead simple.
I dislike php because you can do the following is incredibly hard to debug, and the interpreter will silently go on without any warnings or errors:
ResponderEliminar$ZipCode = '90210';
...
... lots of code
print "the zip is: $ZIPCode\n";
In my opinion this is fundamentally broken, and I will have a hard time convincing myself to use php for any reason because of this.
This is solved with one line in perl5:
use strict;
I was also surprised that ruby and python while they would fail on the above sudo code, they wouldn't fail on the following case:
zipcode = database_row[zipcode];
if(new_data_is_entered) {
zipcdoe = new_zipcodel;
}
In both ruby and python, every assignment translates to "my variable = ".