Last active
December 15, 2015 11:59
-
-
Save pjambet/5256607 to your computer and use it in GitHub Desktop.
Why I hate PHP syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import self |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment