Live data from Hacker News

Comparing PHP, Perl, Python and Ruby

hyperpolyglot.org

1–10 of 92 posts

Re: Comparing PHP, Perl, Python and Ruby

#2
This is great. Very handy for explaining to others the differences between various languages, and surprisingly enough until you get into the array functions i'm starting to feel like PHP isn't really that messy since reading this!

Thanks for sharing, ill pass it on whenever a comparison is needed.

Re: Comparing PHP, Perl, Python and Ruby

#3
post #2

This is great. Very handy for explaining to others the differences between various languages, and surprisingly enough until you get into the array functions i'm starting to feel like PHP isn't really that messy since reading this! Thanks for sharing, ill pass it on whenever a comparison is needed.

PHP5.4 also has the short syntax array initializer:

    $array = [1, 2, 3];
Edit: While PHP still has it's fair share of issues, a lot of the same complaints people had 5-8 years ago aren't valid, and it probably has no more or less oddities than any other scripting language at this point.

Re: Comparing PHP, Perl, Python and Ruby

#6
Note that anywhere you see array() in that list for PHP 5.4 you can replace it with [ ]'s. So the example that has:

  $a = array(1,2,array(3,4));
becomes:

  $a = [1,2,[3,4]];
Also

  0b101010
works in 5.4.

Re: Comparing PHP, Perl, Python and Ruby

#10
post #3
post #2

This is great. Very handy for explaining to others the differences between various languages, and surprisingly enough until you get into the array functions i'm starting to feel like PHP isn't really that messy since reading this! Thanks for sharing, ill pass it on whenever a comparison is needed.

PHP5.4 also has the short syntax array initializer: $array = [1, 2, 3]; Edit: While PHP still has it's fair share of issues, a lot of the same complaints people had 5-8 years ago aren't valid, and it probably has no more or less oddities than any other scripting language at this point.

The problem with PHP is that 99.99% of the code in circulation today isn't the shinier cleaned-up versions. It's PHP4 and PHP 5.0 and it's still chock-a-block with the storied mind-bending nastiness of yore.
Post reply on HN