Skip to content

Instantly share code, notes, and snippets.

@UniBreakfast
Created December 3, 2018 15:19
Show Gist options
  • Save UniBreakfast/71a3fe921ca7b5fa9d0f6484ec9746df to your computer and use it in GitHub Desktop.
Save UniBreakfast/71a3fe921ca7b5fa9d0f6484ec9746df to your computer and use it in GitHub Desktop.
testing php module function in module
<?php
# some function in some php-file meant to be used as a module
function myFunc(param) {
echo param;
}
# testing function from module in that module
# so that it does not impact the usage elsewhere
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) myFunc();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment