PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Hyperpolyglot.org: Syntax for Common Tasks - Side-by-side (Ruby, Perl, Python & PHP)

Note: This article was originally published at PHPDeveloper on 21 April 1170.
PHPDeveloper

On Hyperpolyglot.org there's an interesting listing of scripting language syntax - PHP, Python, Ruby and Perl - showing some of their common syntax and data structures side by side.

Sections of the reference sheet include

  • arithmetic and logic
  • arrays
  • execution control
  • libraries and modules
  • objects
  • reflection

It's interesting to see how the various languages compare, where some have shortcuts for things and others fail at the same (or make it much more difficult). Descriptions for the different row types are also included.