Skip to content

Instantly share code, notes, and snippets.

@pjambet
Last active December 15, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjambet/5256607 to your computer and use it in GitHub Desktop.
Save pjambet/5256607 to your computer and use it in GitHub Desktop.
Why I hate PHP syntax
# user_id is an integer, follow is a hash wich values are all integers
# PHP
$userIds = array_unique(array_merge(array_values($follows), array($userId)));
# ruby
userIds = follows.keys.push(user_id).uniq
# python
userIds = set(follows.keys().append(user_id))
import self
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment