PHP is easy. Perl is not.
That's inaccurate.
I write both, now that I'm immersed in Perl some things are easier.
From the standpoint of a programmer that has written in upwards of 20 programming languages, I didn't find PHP that easy, not because of the script, but because of it's incongruous library with functions that are close to others but miss simple things which make it a real PITA and it's overall design appears to be haphazard at times due to the nature of it's creation.
While Perl has some of the same issues, I find the documentation is what makes Perl more obtuse than the language itself and the examples sorely lacking, usually lacking the discussion and exchange of samples.
Here's some code:
$var = "some string";
$val = 1;
if( $val ) {
foo($var);
}
Is that PHP or PERL?
If the premise that PHP is easier to write then PERL then this must be PHP, right?
For the most part, you could write Perl that looks like PHP, there's no stopping anyone.
That's the big LIE around PHP being simpler, it's just that hard core programmers like the goodies in PERL and use them which is why it's not easier for new programmers to pick it up because they might as well be looking at C or assembler, it's too low level if the programmer wants it to be.
Here's the first tell of PHP vs Perl, the definition of the function:
sub foo {
my ($var) = @_;
... some code
};
vs. the slightly friendlier but less flexible:
function foo ($var)
... some code
};
Which puts the onus of validating the variables passed to the function on the person writing the function, not the compiler, which was an example of some of the same problem of C which drove people to make Java.
However, other that passing variables and that little issue with arrays vs. references to arrays, you can easily write Perl to look pretty much like PHP, but people opt not to do it which is why newcomers are left scratching their heads.
Again, I'm going to stick with my original theorem regarding the mission critical app driving the adoption as it's happened in other cases as well. Back when MSDOS was battling CP/M for supremacy it was apps like Visicalc and Lotus 1-2-3 that shifted the balance of power, later Excel and Word did the same as the competition quite frankly sucked and crashed.
People go with apps that make their lives easier, to get the job done, they don't care about the language and if something bigger, faster, more powerful came along that made WordPress look like a tinker toy, I think that whatever language it was written in would suddenly see a vast increase in popularity.
History would back up my premise, now who's going to write the app to prove my point? :)