Created
February 6, 2014 12:52
-
-
Save byk0t/8843590 to your computer and use it in GitHub Desktop.
php analogue of python's `if __name__ == "__main__"`
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
#!/usr/bin/php | |
<?php | |
if( basename($argv[0]) == basename(__FILE__) ) { | |
echo "\n-----main------\n\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment