Last active
December 18, 2015 11:09
-
-
Save arthurfurlan/5773970 to your computer and use it in GitHub Desktop.
why do I like python!?
This file contains hidden or 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
| #!/usr/bin/env php | |
| <?php | |
| class Hello { | |
| public function say($what) { | |
| echo "Hello {$what}!\n"; | |
| } | |
| } | |
| $hello = new Hello(); | |
| $hello->say('world'); | |
| ?> | |
| ## $ php -f hello.php | |
| ## Hello world! |
This file contains hidden or 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
| #!/usr/bin/env python | |
| class Hello: | |
| def say(self, what): | |
| print 'Hello %s!' % what | |
| hello = Hello() | |
| hello.say('world') | |
| ## $ ruby hello.rb | |
| ## Hello world! |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| class Hello | |
| def say(what) | |
| puts "Hello #{what}!" | |
| end | |
| end | |
| hello = Hello.new | |
| hello.say 'world' | |
| ## $ python hello.py | |
| ## Hello world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment