Skip to content

Instantly share code, notes, and snippets.

@filhodanuvem
Created December 11, 2012 16:07
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 filhodanuvem/4259776 to your computer and use it in GitHub Desktop.
Save filhodanuvem/4259776 to your computer and use it in GitHub Desktop.
Essa questão tem mil interpretações erradas rs
What happens when I execute the following code?
namespace Foo;
function strlen() {}
const INI_ALL = 3;
$a = strlen('hi');
$b = INI_ALL;
try
{
if ($a == 2)
echo INI_ALL;
else
throw new Exception('error');
}
catch (Exception $e)
{
echo $e->getMessage();
}
a)'It will print "3"',
b)'It will print "error"',
c)'It will print "7"',
d)'It will give an Fatal Error'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment