Skip to content

Instantly share code, notes, and snippets.

@clemherreman
Created May 6, 2011 14:30
Show Gist options
  • Save clemherreman/959047 to your computer and use it in GitHub Desktop.
Save clemherreman/959047 to your computer and use it in GitHub Desktop.
PHP WTF of the day #2
<?php
function foo()
{
return bar;
}
echo foo(); // outputs 'bar'. And no error/exception, only a small warning.
@clemherreman
Copy link
Author

Edited. My bad, error_reporting was messed up, as I tested on a stage/prod server.
But still, that you raise a WtfDudeSyntaxeException or a fatal error. Am I the only one to think that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment