Skip to content

Instantly share code, notes, and snippets.

@wandersonwhcr
Created August 11, 2016 18:55
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 wandersonwhcr/e16e9dcfb2c54dafa2f84c145b0de983 to your computer and use it in GitHub Desktop.
Save wandersonwhcr/e16e9dcfb2c54dafa2f84c145b0de983 to your computer and use it in GitHub Desktop.
Namespace Bug?
<?php
namespace One
{
class Foo
{
}
}
namespace Two
{
class Foo
{
}
}
namespace Two
{
use One\Foo;
class Bar extends Foo
{
}
}
@wandersonwhcr
Copy link
Author

PHP Fatal error: Cannot use One\Foo as Foo because the name is already in use in namespace-bug.php on line 19

@mrclay
Copy link

mrclay commented May 7, 2017

Clearer demonstration, thanks.

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