Skip to content

Instantly share code, notes, and snippets.

@patrickallaert
Last active August 29, 2015 14:16
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 patrickallaert/d751733fea4545777d4f to your computer and use it in GitHub Desktop.
Save patrickallaert/d751733fea4545777d4f to your computer and use it in GitHub Desktop.
<?php
function doSomeStuff($myArg) {
if (!is_string($myArg)) {
// Will break if it passes and $myArg is an array while not being business logic but pure logging
trigger_error("Wrong data passed: $myArg", E_USER_NOTICE);
}
// Rest of the function
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment